updatelistener.go 369 B

1234567891011121314151617
  1. //go:generate mockgen -package internal -destination updatelistener_mock.go -source updatelistener.go UpdateListener
  2. package internal
  3. type (
  4. // A KV is used to store an etcd entry with key and value.
  5. KV struct {
  6. Key string
  7. Val string
  8. }
  9. // UpdateListener wraps the OnAdd and OnDelete methods.
  10. UpdateListener interface {
  11. OnAdd(kv KV)
  12. OnDelete(kv KV)
  13. }
  14. )