Versions in this module Expand all Collapse all v0 v0.0.6 Jun 9, 2026 Changes in this version + func IdentityTransform(_ string, raw string) (string, error) + type CachedOption func(*CachedSource) + func WithTTL(ttl time.Duration) CachedOption + type CachedSource struct + func NewCachedSource(remote Reader, opts ...CachedOption) (*CachedSource, error) + func (c *CachedSource) Close() error + func (c *CachedSource) Invalidate(key string) + func (c *CachedSource) InvalidateAll() + func (c *CachedSource) Load(ctx context.Context, key string) (string, error) + func (c *CachedSource) Watch(ctx context.Context, key string) (<-chan struct{}, error) + type FSSourceOption func(*FileSystemSource) + func WithFSPrefix(prefix string) FSSourceOption + type FileSource struct + func NewFileSource() *FileSource + func (fs *FileSource) Close() error + func (fs *FileSource) Load(ctx context.Context, key string) (string, error) + func (fs *FileSource) Watch(ctx context.Context, key string) (<-chan struct{}, error) + type FileSystemSource struct + func NewFileSystemSource(fsys fs.FS, opts ...FSSourceOption) (*FileSystemSource, error) + func (s *FileSystemSource) Close() error + func (s *FileSystemSource) Load(ctx context.Context, key string) (string, error) + type MemSource struct + func NewMemSource() *MemSource + func (ms *MemSource) Close() error + func (ms *MemSource) Delete(key string) + func (ms *MemSource) Load(ctx context.Context, key string) (string, error) + func (ms *MemSource) Set(key, code string) + func (ms *MemSource) Watch(ctx context.Context, key string) (<-chan struct{}, error) + type MultiSource struct + func NewFallbackSource(sources ...Reader) (*MultiSource, error) + func NewFirstOKSource(sources ...Reader) (*MultiSource, error) + func NewMultiSource(strategy MultiStrategy, sources ...Reader) (*MultiSource, error) + func (ms *MultiSource) Close() error + func (ms *MultiSource) Load(ctx context.Context, key string) (string, error) + func (ms *MultiSource) Watch(ctx context.Context, key string) (<-chan struct{}, error) + type MultiStrategy int + const MultiStrategyFallback + const MultiStrategyFirstOK + type ReadWatcher interface + type Reader interface + Close func() error + Load func(ctx context.Context, key string) (code string, err error) + type TransformFunc func(key string, raw string) (string, error) + type TransformSource struct + func NewTransformSource(inner Reader, transforms ...TransformFunc) (*TransformSource, error) + func (ts *TransformSource) Close() error + func (ts *TransformSource) Load(ctx context.Context, key string) (string, error) + func (ts *TransformSource) Then(fn TransformFunc) (*TransformSource, error) + func (ts *TransformSource) Watch(ctx context.Context, key string) (<-chan struct{}, error) + type Watcher interface + Watch func(ctx context.Context, key string) (<-chan struct{}, error)