Releases: statsig-io/go-sdk
Releases · statsig-io/go-sdk
v1.7.0 - Adds ErrorBoundary and Logging configuration
- Added
LoggingInterval
andLoggingMaxBufferSize
toOptions
LoggingInterval
assigns the number of seconds to wait between each batch logLoggingMaxBufferSize
is the maximum number of events to queue before batch logging
- Update logic to support Users without UserID. Now Users must have a UserID or 1 valid CustomID
- [Internal] Added evaluation details, error boundary, SDK version testing
v1.6.1 - Layer exposure bug fix
A bug was identified where holdouts were not being applied to Layer exposures. This is fixed in v1.6.1
v1.6.0 - added bootstrap options
- added options related to bootstrapping the SDK:
-
BootstrapValues
: pass a JSON string that represents the rulesets to bootstrap the SDK so that it can work even if Statsig backend is unreachable
-
RulesUpdatedCallback
: this callback is invoked whenever there are updated rulesets fetched by the SDK. It has 2 parameters, rules (string), and time (int64) that represent the JSON rulesets and the freshness of it.
v1.5.1 - make shutdown thread safe and linter fixes
- made
shutdown()
not clear the shared instance so that it's thread safe; - fixed a few linter issues in the SDK
v1.5.0 - concurrency support
- in this release we added a few tests where the SDK is being used concurrently from multiple goroutines, enabled race detector on all tests, and fixed code and tests that were broken before.
- added a
getMap()
API on DynamicConfig and Layer
v1.4.2 - bug fixes
2 bug fixes:
- infinite tail recursions in store class
- shutdown might be delayed for a few seconds due to a data race
Thanks @sbunce for the suggestions!
v1.4.1 - bug fix
Fixed a data race in normalizeUser
function
v1.4.0 - Layers API and fixes
- introduced a new API
getLayer
, see docs.statsig.com/layers for details - fixed a deadlock bug in logger
v1.3.1 - Fixes race condition in the logger
The logger has a single queue of events being accessed from multiple threads. This patch fixes a race condition in the logger
v1.3.0 - Adds overrideGate and overrideConfig APIs, improves ID list implementation
Introduces overrides, which are useful for testing.
func OverrideGate(gate string, val bool)
func OverrideConfig(config string, val map[string]interface{})
We recommend using this, in combination with the LocalMode
option in StatsigOptions
to force gate/config values in test environments and remove network access to statsig servers.
e.g.
c := NewClientWithOptions(secret, &Options{LocalMode: true})
user := User{
UserID: "123",
}
gateDefault := c.CheckGate(user, "any_gate")
// "any_gate" is false by default
c.OverrideGate("any_gate", true)
// "any_gate" is now true
Also introduces a more performant ID list implementation