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.

19 lines
449 B

package config
import "context"
type Provider interface {
Read(ctx context.Context, key Key) (Variable, error)
}
type WatchCallback func(ctx context.Context, oldVar, newVar Variable)
type WatchProvider interface {
Watch(ctx context.Context, key Key, callback WatchCallback) error
}
type ReadConfig interface {
Value(ctx context.Context, name string) (Value, error)
}
type Factory func(ctx context.Context, cfg ReadConfig) (Provider, error)