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.

21 lines
434 B

3 years ago
package config
import "context"
type Provider interface {
Value(ctx context.Context, path ...string) (Value, error)
3 years ago
}
type NamedProvider interface {
Name() string
Provider
3 years ago
}
4 months ago
type WatchCallback func(ctx context.Context, oldVar, newVar Value) error
type WatchProvider interface {
Watch(ctx context.Context, callback WatchCallback, path ...string) error
3 years ago
}
type Factory func(ctx context.Context, cfg Provider) (Provider, error)