MCPcopy
hub / github.com/grafana/dskit / destroyEventConsumer

Method destroyEventConsumer

kv/etcd/mock.go:145–150  ·  view source on GitHub ↗

destroyEventConsumer removes the given channel from the list of channels that events should be sent to and closes it.

(ch chan clientv3.Event)

Source from the content-addressed store, hash-verified

143// destroyEventConsumer removes the given channel from the list of channels that events
144// should be sent to and closes it.
145func (m *mockKV) destroyEventConsumer(ch chan clientv3.Event) {
146 m.eventsMtx.Lock()
147 delete(m.events, ch)
148 m.eventsMtx.Unlock()
149 close(ch)
150}
151
152// sendEvent writes an event to all currently registered events. The consumer
153// channels are each read by a goroutine that filters the event and sends it to

Callers 1

WatchMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected