Documentation
¶
Index ¶
- Constants
- func NewContextWithClient(ctx context.Context, ldClient *Client) context.Context
- type Client
- func (ldClient *Client) GetCompressionStrength() any
- func (ldClient *Client) GetFeatureFlagValue(key string, defaultValue any) any
- func (ldClient *Client) ManagedBuilderEnabled() bool
- func (ldClient *Client) ManagedPostgresEnabled() bool
- func (ldClient *Client) Refresh(ctx context.Context) error
- func (ldClient *Client) UnmanagedPostgresEnabled() bool
- func (ldClient *Client) UseZstdEnabled() bool
- func (ldClient *Client) WireGuardTokenModeEnabled() bool
- type FeatureFlag
- type UserInfo
Constants ¶
const WireGuardTokenModeFlag = "wireguard-token-mode"
WireGuardTokenModeFlag is the boolean flag that, when on for a user, makes the agent build that user's WireGuard tunnels through the token gateway regardless of the local wire_guard_token_mode config.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func ClientFromContext ¶
func NewServiceClient ¶ added in v0.3.122
func NewUserClient ¶ added in v0.4.118
NewUserClient returns a client that evaluates flags for the user with the given numeric id and no organization. Unlike NewClient it neither fetches anything nor starts the background poller: callers Refresh it whenever they want a current value, which suits long-lived processes like the agent that re-evaluate at well-defined moments.
func (*Client) GetCompressionStrength ¶ added in v0.3.188
func (*Client) GetFeatureFlagValue ¶
func (*Client) ManagedBuilderEnabled ¶ added in v0.3.149
func (*Client) ManagedPostgresEnabled ¶ added in v0.3.122
func (*Client) Refresh ¶ added in v0.4.118
Refresh re-fetches the flags from LaunchDarkly. Until a Refresh succeeds every flag reads as its default.
func (*Client) UnmanagedPostgresEnabled ¶ added in v0.3.122
func (*Client) UseZstdEnabled ¶ added in v0.3.188
func (*Client) WireGuardTokenModeEnabled ¶ added in v0.4.118
WireGuardTokenModeEnabled reports whether WireGuardTokenModeFlag is on. Anything but a boolean true (unset, false, a mistyped flag) counts as off.