Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNilConfig = platformerrors.New("missing config") ErrMissingCredentials = platformerrors.New("missing PostHog credentials") )
Functions ¶
func NewFeatureFlagManager ¶
func NewFeatureFlagManager(cfg *Config, logger logging.Logger, tracerProvider tracing.TracerProvider, metricsProvider metrics.Provider, circuitBreaker circuitbreaking.CircuitBreaker, configModifiers ...func(config *posthog.Config)) (featureflags.FeatureFlagManager, error)
NewFeatureFlagManager constructs a new featureFlagManager backed by OpenFeature.
Types ¶
type Config ¶
type Config struct {
ProjectAPIKey string `env:"PROJECT_API_KEY" json:"projectAPIKey"`
PersonalAPIKey string `env:"PERSONAL_API_KEY" json:"personalAPIKey"`
// Endpoint is the PostHog host. Leave empty for PostHog US Cloud (the SDK
// default); set it for EU Cloud (https://eu.posthog.com) or self-hosted.
Endpoint string `env:"ENDPOINT" json:"endpoint"`
CircuitBreakerConfig circuitbreakingcfg.Config `envPrefix:"CIRCUIT_BREAKING_" json:"circuitBreakerConfig"`
}
Click to show internal directories.
Click to hide internal directories.