You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
359 B
21 lines
359 B
4 years ago
|
package config
|
||
|
|
||
|
// KeyValue is config key value.
|
||
|
type KeyValue struct {
|
||
|
Key string
|
||
|
Value []byte
|
||
|
Metadata map[string]string
|
||
|
}
|
||
|
|
||
|
// Source is config source.
|
||
|
type Source interface {
|
||
|
Load() ([]*KeyValue, error)
|
||
|
Watch() (Watcher, error)
|
||
|
}
|
||
|
|
||
|
// Watcher watches a source for changes.
|
||
|
type Watcher interface {
|
||
|
Next() ([]*KeyValue, error)
|
||
|
Close() error
|
||
|
}
|