1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-02-03 13:11:42 +02:00
kratos/config/source.go
Tony Chen a4409adf16
fix interface defines (#760)
* fix interface defines
2021-03-11 23:26:07 +08:00

21 lines
358 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)
Stop() error
}