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

21 lines
341 B
Go
Raw Normal View History

2021-02-17 11:14:47 +02:00
package config
// KeyValue is config key value.
type KeyValue struct {
2021-05-17 15:52:23 +02:00
Key string
Value []byte
Format string
2021-02-17 11:14:47 +02:00
}
// 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
2021-02-17 11:14:47 +02:00
}