Files
config/provider.go
andrey 085589a938
Some checks failed
continuous-integration/drone/push Build is failing
add stop watch
2024-01-25 20:49:37 +03:00

21 lines
434 B
Go

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