MCPcopy
hub / github.com/crowdsecurity/crowdsec / Start

Method Start

pkg/longpollclient/client.go:209–217  ·  view source on GitHub ↗
(ctx context.Context, since time.Time)

Source from the content-addressed store, hash-verified

207}
208
209func (c *LongPollClient) Start(ctx context.Context, since time.Time) chan Event {
210 c.logger.Infof("starting polling client")
211 c.c = make(chan Event)
212 c.since = since.Unix() * 1000
213 c.timeout = "45"
214 c.t = tomb.Tomb{}
215 c.t.Go(func() error { return c.pollEvents(ctx) })
216 return c.c
217}
218
219func (c *LongPollClient) Stop() error {
220 c.t.Kill(nil)

Callers

nothing calls this directly

Calls 1

pollEventsMethod · 0.95

Tested by

no test coverage detected