MCPcopy Create free account
hub / github.com/ForestHubAI/edge-agents / Setup

Method Setup

go/engine/node/trigger/ticker.go:29–36  ·  view source on GitHub ↗
(_ context.Context)

Source from the content-addressed store, hash-verified

27}
28
29func (t *Ticker) Setup(_ context.Context) error {
30 // time.NewTicker panics on a non-positive interval; fail as an error instead.
31 if t.Interval <= 0 {
32 return fmt.Errorf("ticker %s: interval must be positive, got %s", t.ID(), t.Interval)
33 }
34 t.tk = time.NewTicker(t.Interval)
35 return nil
36}
37
38func (t *Ticker) Wait(ctx context.Context) (engine.Event, error) {
39 select {

Callers 1

TestTicker_LifecycleFunction · 0.95

Calls 1

IDMethod · 0.65

Tested by 1

TestTicker_LifecycleFunction · 0.76