Versions in this module Expand all Collapse all v1 v1.0.0 Nov 1, 2026 Changes in this version + var ErrClosed = errors.New("configuration manager is closed") + type ConfigError struct + Cause error + Message string + Source string + Type ErrorType + func NewConfigError(errType ErrorType, source, message string, cause error) *ConfigError + func NewParseError(source, message string, cause error) *ConfigError + func NewValidationError(source, message string, cause error) *ConfigError + func (e *ConfigError) Error() string + func (e *ConfigError) Is(target error) bool + func (e *ConfigError) Unwrap() error + type ConfigManager struct + func LoadContext[T any](ctx context.Context, path string, opts ...Option) (*ConfigManager[T], error) + func LoadSource[T any](ctx context.Context, source Source, opts ...Option) (*ConfigManager[T], error) + func Load[T any](path string, opts ...Option) (*ConfigManager[T], error) + func MustLoad[T any](path string, opts ...Option) *ConfigManager[T] + func (cm *ConfigManager[T]) Close() error + func (cm *ConfigManager[T]) Errors() <-chan error + func (cm *ConfigManager[T]) Get() *T + func (cm *ConfigManager[T]) Reload() error + func (cm *ConfigManager[T]) Snapshot() *T + type Decoder func([]byte, any) error + type Encoder func(any) ([]byte, error) + type ErrorType int + const ErrorTypeFileNotFound + const ErrorTypeMergeFailure + const ErrorTypeParseFailure + const ErrorTypeUnknown + const ErrorTypeValidationFailure + const ErrorTypeWatchFailure + func (et ErrorType) String() string + type HTTPOptions = httpconfig.Options + type Option func(*options) + func WithCodec(decode Decoder, encode Encoder) Option + func WithCreateIfMissing() Option + func WithHTTP(opts HTTPOptions) Option + func WithPollInterval(d time.Duration) Option + func WithSubscription(s Subscribe) Option + func WithValidation(fn func(any) error) Option + func WithWatch() Option + type Source func(context.Context) ([]byte, error) + type Subscribe func(notify func(error)) (stop func() error, err error)