Documentation ¶
Index ¶
- type Config
- type FeatureFlagger
- type UnleashListener
- func (l UnleashListener) OnCount(name string, enabled bool)
- func (l UnleashListener) OnError(err error)
- func (l UnleashListener) OnReady()
- func (l UnleashListener) OnRegistered(payload unleash.ClientData)
- func (l UnleashListener) OnSent(payload unleash.MetricsData)
- func (l UnleashListener) OnWarning(warning error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Environment string `envconfig:"ENVIRONMENT"` UnleashURL string `envconfig:"UNLEASH_URL"` UnleashInstanceID string `envconfig:"UNLEASH_INSTANCE_ID"` }
Config represents a Feature Flagger Configuration
type FeatureFlagger ¶
type FeatureFlagger struct {
// contains filtered or unexported fields
}
FeatureFlagger represents a service to check feature flags
func (*FeatureFlagger) IsEnabled ¶
func (ff *FeatureFlagger) IsEnabled(key string, fallback bool) bool
IsEnabled checks if a feature flag is enabled globally
func (*FeatureFlagger) IsEnabledFor ¶
func (ff *FeatureFlagger) IsEnabledFor(key string, fallback bool, userID string) bool
IsEnabled checks if a feature flag is enabled for a specific UserID
type UnleashListener ¶
type UnleashListener struct{}
UnleashListener is our listener for Unleash events
func (UnleashListener) OnCount ¶
func (l UnleashListener) OnCount(name string, enabled bool)
OnCount prints to the console when the feature is queried.
func (UnleashListener) OnReady ¶
func (l UnleashListener) OnReady()
OnReady prints to the console when the repository is ready.
func (UnleashListener) OnRegistered ¶
func (l UnleashListener) OnRegistered(payload unleash.ClientData)
OnRegistered prints to the console when the client has registered.
func (UnleashListener) OnSent ¶
func (l UnleashListener) OnSent(payload unleash.MetricsData)
OnSent prints to the console when the server has uploaded metrics.
func (UnleashListener) OnWarning ¶
func (l UnleashListener) OnWarning(warning error)
OnWarning logs warnings
Click to show internal directories.
Click to hide internal directories.