| 19 | const maxWaitTime = 100 * time.Millisecond |
| 20 | |
| 21 | type mockKV struct { |
| 22 | mtx sync.Mutex |
| 23 | cond *sync.Cond |
| 24 | kvps map[string]*consul.KVPair |
| 25 | current uint64 // the current 'index in the log' |
| 26 | logger log.Logger |
| 27 | |
| 28 | // Channel closed once the in-memory consul mock should be closed. |
| 29 | close chan struct{} |
| 30 | closeWG sync.WaitGroup |
| 31 | } |
| 32 | |
| 33 | // NewInMemoryClient makes a new mock consul client. |
| 34 | func NewInMemoryClient(codec codec.Codec, logger log.Logger, registerer prometheus.Registerer) (*Client, io.Closer) { |
nothing calls this directly
no outgoing calls
no test coverage detected