WatchKey watches a key.
(ctx context.Context, key string, f func(any) bool)
| 43 | |
| 44 | // WatchKey watches a key. |
| 45 | func (c *prefixedKVClient) WatchKey(ctx context.Context, key string, f func(any) bool) { |
| 46 | c.client.WatchKey(ctx, c.prefix+key, f) |
| 47 | } |
| 48 | |
| 49 | // WatchPrefix watches a prefix. For a prefix client it appends the prefix argument to the clients prefix. |
| 50 | func (c *prefixedKVClient) WatchPrefix(ctx context.Context, prefix string, f func(string, any) bool) { |