1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-01-14 02:33:03 +02:00
kratos/config/source.go
2021-02-17 17:14:47 +08:00

21 lines
359 B
Go

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
}