Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultClient *featuresClient
Functions ¶
func Configure ¶
func Configure(serverURL, project string, opts ...ConfigureOption)
Configure initializes the default feature client with the provided server URL and project, and starts a background synchronization process.
func Flag ¶
func Flag(code string, opts ...FlagOption) bool
Flag returns true if the flag is enabled with the given options.
Types ¶
type ConfigureOption ¶ added in v0.2.0
type ConfigureOption func(*configureOptions)
func WithDisableStats ¶ added in v0.2.0
func WithDisableStats(disabled bool) ConfigureOption
func WithLogger ¶ added in v0.2.0
func WithLogger(logger *slog.Logger) ConfigureOption
type FlagOption ¶
type FlagOption func(*flagOptions)
func WithTenant ¶
func WithTenant(tenant string) FlagOption
WithTenant sets the tenant for the flag.
type Pool ¶ added in v0.3.0
type Pool struct {
// contains filtered or unexported fields
}
Pool manages feature clients keyed by project for the same server URL. Concurrent calls for the same project reuse the same Client and its cache.
func NewPool ¶ added in v0.3.0
func NewPool(serverURL string, opts ...ConfigureOption) *Pool
NewPool creates a pool that lazily builds clients for each project.
Click to show internal directories.
Click to hide internal directories.