MCPcopy
hub / github.com/istio/istio / Start

Method Start

pkg/test/framework/components/echo/util/traffic/generator.go:79–95  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

77}
78
79func (g *generator) Start() Generator {
80 go func() {
81 t := time.NewTimer(g.Interval)
82 for {
83 select {
84 case <-g.stop:
85 t.Stop()
86 close(g.stopped)
87 return
88 case <-t.C:
89 g.result.add(g.Source.Call(g.Options))
90 t.Reset(g.Interval)
91 }
92 }
93 }()
94 return g
95}
96
97func (g *generator) Stop() Result {
98 // Trigger the generator to stop.

Callers

nothing calls this directly

Calls 4

StopMethod · 0.65
CallMethod · 0.65
ResetMethod · 0.65
addMethod · 0.45

Tested by

no test coverage detected