MCPcopy
hub / github.com/cilium/cilium / Trigger

Struct Trigger

pkg/trigger/trigger.go:72–97  ·  view source on GitHub ↗

Trigger represents an active trigger logic. Use NewTrigger() to create a trigger

Source from the content-addressed store, hash-verified

70// Trigger represents an active trigger logic. Use NewTrigger() to create a
71// trigger
72type Trigger struct {
73 // protect mutual access of 'trigger' between Trigger() and waiter()
74 mutex lock.Mutex
75 trigger bool
76
77 // params are the user specified parameters
78 params Parameters
79
80 // lastTrigger is the timestamp of the last invoked trigger
81 lastTrigger time.Time
82
83 // wakeupCan is used to wake up the background trigger routine
84 wakeupChan chan struct{}
85
86 // closeChan is used to stop the background trigger routine
87 closeChan chan struct{}
88
89 // numFolds is the current count of folds that happened into the
90 // currently scheduled trigger
91 numFolds int
92
93 // foldedReasons is the sum of all unique reasons folded together.
94 foldedReasons reasonStack
95
96 waitStart time.Time
97}
98
99// NewTrigger returns a new trigger based on the provided parameters
100func NewTrigger(p Parameters) (*Trigger, error) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected