Categorygithub.com/statsig-io/go-sdk
modulepackage
1.29.0
Repository: https://github.com/statsig-io/go-sdk.git
Documentation: pkg.go.dev

# README

Statsig Go Server SDK

tests

The Statsig Go SDK for multi-user, server side environments. If you need a SDK for another language or single user client environment, check out our other SDKs.

Statsig helps you move faster with Feature Gates (Feature Flags) and Dynamic Configs. It also allows you to run A/B tests to validate your new features and understand their impact on your KPIs. If you're new to Statsig, create an account at statsig.com.

Getting Started

Check out our SDK docs to get started.

Testing

Each server SDK is tested at multiple levels - from unit to integration and e2e tests. Our internal e2e test harness runs daily against each server SDK, while unit and integration tests can be seen in the respective github repos of each SDK. The statsig_test.go runs a validation test on local rule/condition evaluation for this SDK against the results in the statsig backend.

Guidelines

# Functions

Checks the value of a Feature Gate for the given user.
Checks the value of a Feature Gate for the given user without logging an exposure event.
No description provided by the author
No description provided by the author
No description provided by the author
Gets the DynamicConfig value for the given user.
Gets the DynamicConfig value for the given user without logging an exposure event.
Gets the DynamicConfig value of an Experiment for the given user.
Gets the name of layer an Experiment.
Gets the DynamicConfig value of an Experiment for the given user without logging an exposure event.
Gets the DynamicConfig value of an Experiment for the given user with configurable options.
Get the Feature Gate for the given user.
Get the Feature Gate for the given user without logging an exposure event.
Gets the Layer object for the given user.
Gets the Layer object for the given user without logging an exposure event.
Gets the Layer object for the given user with configurable options.
No description provided by the author
Initializes the global Statsig instance with the given sdkKey.
No description provided by the author
No description provided by the author
Initializes the global Statsig instance with the given sdkKey and options.
IsInitialized returns whether the global Statsig instance has already been initialized or not.
Logs an event to the Statsig console.
No description provided by the author
Logs a slice of events to Statsig server immediately.
Logs an exposure event for the dynamic config.
Logs an exposure event for the experiment.
Logs an exposure event for the gate.
Logs an exposure event for the parameter in the given layer.
Initializes a Statsig Client with the given sdkKey.
Initializes a Statsig Client with the given sdkKey and options.
No description provided by the author
No description provided by the author
No description provided by the author
Override the DynamicConfig value for the given user.
Override the value of a Feature Gate for the given user.
Override the Layer value for the given user.
No description provided by the author
Cleans up Statsig, persisting any Event Logs and cleanup processes Using any method is undefined after Shutdown() has been called.
For test only so we can clear the shared instance.

# Constants

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Structs

No description provided by the author
An instance of a StatsigClient for interfacing with Statsig Feature Gates, Dynamic Configs, Experiments, and Event Logging.
No description provided by the author
No description provided by the author
A json blob configured in the Statsig Console.
See https://docs.statsig.com/guides/usingEnvironments.
No description provided by the author
No description provided by the author
an event to be sent to Statsig for logging and analysis.
No description provided by the author
No description provided by the author
No description provided by the author
options for getClientInitializeResponse.
No description provided by the author
No description provided by the author
Using global state variables directly will lead to race conditions Instead, define an accessor below using the Mutex lock.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Advanced options for configuring the Statsig SDK.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
The properties of this struct must fit a universal schema that when JSON-ified, can be parsed by every SDK supporting user persistent evaluation.
No description provided by the author
No description provided by the author
User specific attributes for evaluating Feature Gates, Experiments, and DynamicConfigs NOTE: UserID is **required** - see https://docs.statsig.com/messages/serverRequiredUserID\ PrivateAttributes are only used for user targeting/grouping in feature gates, dynamic configs, experiments and etc; they are omitted in logs.

# Interfaces

* * An adapter for implementing custom storage of config specs.
* * A storage adapter for persisted values.

# Type aliases

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Error Variables.
No description provided by the author
No description provided by the author