Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNotFound is key not found. ErrNotFound = errors.New("key not found") // ErrTypeAssert is type assert error. ErrTypeAssert = errors.New("type assert error") )
Functions ¶
This section is empty.
Types ¶
type ChangedListener ¶
type ChangedListener interface { // Changed 指定配置变化后的通知接口,标示变化的路径和变化后的vars(变化后的新数据值)。 Changed(vars map[string]string) }
ChangedListener 配置数据发生变化时的监听器接口。
type Config ¶
type Config struct { AuthToken string AuthType string BasicAuth bool ClientCaKeys string ClientCert string ClientKey string ClientInsecure bool BackendNodes Nodes Username string Password string Scheme string Table string Separator string AppID string UserID string RoleID string SecretID string YamlFile Nodes Filter string Path string Role string }
type Configuration ¶
type Configuration interface { Value(key string) Value Watch(prefix string, key []string, o ChangedListener) error Close() error }
Configuration 是一个配置接口.
type Processor ¶
type Processor interface {
Process(listener ChangedListener)
}
func WatchProcessor ¶
Click to show internal directories.
Click to hide internal directories.