Documentation ¶
Overview ¶
Package statsig implements feature gating and a/b testing
Index ¶
- func CheckGate(user types.StatsigUser, gate string) bool
- func GetConfig(user types.StatsigUser, config string) types.DynamicConfig
- func GetExperiment(user types.StatsigUser, experiment string) types.DynamicConfig
- func Initialize(sdkKey string)
- func InitializeWithOptions(sdkKey string, options *types.StatsigOptions)
- func LogEvent(event types.StatsigEvent)
- func Shutdown()
- func WrapperSDK(sdkKey string, options *types.StatsigOptions, sdkName string, ...)
- type Client
- func (c *Client) CheckGate(user types.StatsigUser, gate string) bool
- func (c *Client) GetConfig(user types.StatsigUser, config string) types.DynamicConfig
- func (c *Client) GetExperiment(user types.StatsigUser, experiment string) types.DynamicConfig
- func (c *Client) LogEvent(event types.StatsigEvent)
- func (c *Client) Shutdown()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckGate ¶
func CheckGate(user types.StatsigUser, gate string) bool
Checks the value of a Feature Gate for the given user
func GetConfig ¶
func GetConfig(user types.StatsigUser, config string) types.DynamicConfig
Gets the DynamicConfig value for the given user
func GetExperiment ¶
func GetExperiment(user types.StatsigUser, experiment string) types.DynamicConfig
Gets the DynamicConfig value of an Experiment for the given user
func Initialize ¶
func Initialize(sdkKey string)
Initializes the global Statsig instance with the given sdkKey
func InitializeWithOptions ¶
func InitializeWithOptions(sdkKey string, options *types.StatsigOptions)
Initializes the global Statsig instance with the given sdkKey and options
func Shutdown ¶
func Shutdown()
Cleans up Statsig, persisting any Event Logs and cleanup processes Using any method is undefined after Shutdown() has been called
func WrapperSDK ¶ added in v0.2.1
func WrapperSDK(sdkKey string, options *types.StatsigOptions, sdkName string, sdkVersion string)
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
An instance of a StatsigClient for interfacing with Statsig Feature Gates, Dynamic Configs, Experiments, and Event Logging
func NewWithOptions ¶
func NewWithOptions(sdkKey string, options *types.StatsigOptions) *Client
Initializes a Statsig Client with the given sdkKey and options
func WrapperSDKInstance ¶ added in v0.2.1
func (*Client) CheckGate ¶
func (c *Client) CheckGate(user types.StatsigUser, gate string) bool
Checks the value of a Feature Gate for the given user
func (*Client) GetConfig ¶
func (c *Client) GetConfig(user types.StatsigUser, config string) types.DynamicConfig
Gets the DynamicConfig value for the given user
func (*Client) GetExperiment ¶
func (c *Client) GetExperiment(user types.StatsigUser, experiment string) types.DynamicConfig
Gets the DynamicConfig value of an Experiment for the given user
func (*Client) LogEvent ¶
func (c *Client) LogEvent(event types.StatsigEvent)
Logs an event to Statsig for analysis in the Statsig Console