Versions in this module Expand all Collapse all v0 v0.3.0 Nov 10, 2026 Changes in this version + const MaxBodyBytes + const RefreshModeEnvVar + const URLEnvVar + const Version + func Enabled(name string) bool + func Ready(ctx context.Context) bool + func Refresh(ctx context.Context) bool + type Client struct + func Default() *Client + func New(opts Options) *Client + func (c *Client) Close() + func (c *Client) Enabled(name string) (on bool) + func (c *Client) ForceRefresh(ctx context.Context) bool + func (c *Client) Ready(ctx context.Context) bool + func (c *Client) Refresh(ctx context.Context) bool + func (c *Client) Snapshot() (doc *Document) + type Document struct + Environment string + Flags map[string]Flag + NotifySlack bool + Project string + Version int64 + func Snapshot() *Document + type ErrorCode string + const CodeHTTP + const CodeNetwork + const CodeParse + const CodeTimeout + type FetchError struct + Code ErrorCode + Err error + Message string + Status int + func (e *FetchError) Error() string + func (e *FetchError) Unwrap() error + type Flag struct + CreatedAt time.Time + Description string + Enabled bool + UpdatedAt time.Time + UpdatedBy string + type HealthEvent struct + Err error + Kind HealthKind + URL string + type HealthKind string + const Failing + const Recovered + type Options struct + FetchTimeout time.Duration + OnError func(HealthEvent) + PollInterval time.Duration + RefreshMode RefreshMode + URL string + type RefreshMode string + const Background + const OnDemand