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

Method sendEvent

kv/etcd/mock.go:155–165  ·  view source on GitHub ↗

sendEvent writes an event to all currently registered events. The consumer channels are each read by a goroutine that filters the event and sends it to the caller of the Watch method.

(e clientv3.Event)

Source from the content-addressed store, hash-verified

153// channels are each read by a goroutine that filters the event and sends it to
154// the caller of the Watch method.
155func (m *mockKV) sendEvent(e clientv3.Event) {
156 m.eventsMtx.Lock()
157 for ch := range m.events {
158 // non-blocking send
159 select {
160 case ch <- e:
161 default:
162 }
163 }
164 m.eventsMtx.Unlock()
165}
166
167// RequestProgress implements the Clientv3Facade interface
168func (m *mockKV) RequestProgress(context.Context) error {

Callers 2

doDeleteMethod · 0.95
doPutMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected