Versions in this module Expand all Collapse all v0 v0.14.0 Mar 22, 2025 Changes in this version + const PprofEnabledKey + func ConfigFilter(ctx context.Context, manager *Manager, configKey string, ...) func(*restful.Request, *restful.Response, *restful.FilterChain) + func ConfigFilterNotFoundWhenNotTrue(ctx context.Context, req *restful.Request, key string, value FeatureValue) (err error) + func GetDurationConfig(ctx context.Context, key string, defaultDuration time.Duration) time.Duration + func Name() string + func WithKatanomiConfigManager(ctx context.Context, manager *Manager) context.Context + type Config struct + Data map[string]string + func (c Config) GetBool(key string) (*bool, error) + func (c Config) GetObject(key string, object interface{}) error + type ConfigKeyExpectedValueFunc func(ctx context.Context, req *restful.Request, key string, value FeatureValue) (err error) + type FeatureFlags struct + Data map[string]string + func (f *FeatureFlags) FeatureValue(flag string) FeatureValue + type FeatureValue string + const DefaultPprofEnabled + const False + const True + func (f FeatureValue) AsBool() (bool, error) + func (f FeatureValue) AsDuration() (time.Duration, error) + func (f FeatureValue) AsInt() (int, error) + func (f FeatureValue) String() string + type HasFeatureChangedFunc func(new *FeatureFlags, old *FeatureFlags) bool + type ListByFeatureFlagChanged func(ctx context.Context) []metav1.Object + type Manager struct + Informer watcher.DefaultingWatcherWithOnChange + Logger *zap.SugaredLogger + func KatanomiConfigManager(ctx context.Context) *Manager + func NewManager(informer watcher.DefaultingWatcherWithOnChange, logger *zap.SugaredLogger, ...) *Manager + func (manager *Manager) AddWatcher(w Watcher) + func (manager *Manager) GetConfig() *Config + func (manager *Manager) GetFeatureFlag(flag string) FeatureValue + func (manager *Manager) GetFeatureFlagByClient(ctx context.Context, flag string) FeatureValue + type ManagerInterface interface + GetConfig func() *Config + GetFeatureFlag func(flag string) FeatureValue + type WatchFunc func(*Config) + type Watcher interface + Watch func(config *Config) + func NewConfigWatcher(cb WatchFunc) Watcher