Skip to content

Releases: configcat/go-sdk

v7.5.0

17 Jun 15:13
98bd5f9
Compare
Choose a tag to compare
  • GetAllValues() function that evaluates all flags & settings in a map[string]interface{}.
  • FlagOverrides configuration option to support the reading of flags & settings from a local file or from a map[string]interface{}.

v7.4.2

11 Mar 15:00
7b09235
Compare
Choose a tag to compare
  • fix panic when a key isn't found #51

v7.4.1

09 Mar 12:40
Compare
Choose a tag to compare
  • Readded the missing polling identifier to the X-ConfigCat-UserAgent header.

v7.4.0

09 Mar 12:03
4451c1c
Compare
Choose a tag to compare
  • add Config.DefaultUser #49
  • configcattest: add variation IDs #50

v7.3.0

14 Feb 11:09
13b0b80
Compare
Choose a tag to compare

Thanks to @rogpeppe for the contribution!

v7.2.0

24 Jan 13:14
a1e4d67
Compare
Choose a tag to compare
  • A .Key() accessor was added to each flag type. #43

Thanks to @rogpeppe for the contribution!

v7.1.0

19 Jan 12:43
b810213
Compare
Choose a tag to compare
  • Ability to create Snapshot from already known values. #41
  • Tests for log entries. #42

Special thanks to @rogpeppe for the improvements.

v7.0.0

02 Feb 12:28
Compare
Choose a tag to compare

Breaking changes:

Here is the list of breaking API changes compared to v6:

Configuration:

  • When using the configcat.NewCustomClient(config) function, the SDKKey is moved to the config struct.
  • The configuration of Polling modes changed:
    • AutoPoll:
    configcat.Config{SDKKey: "<PLACE-YOUR-SDK-KEY-HERE>", 
      PollingMode: configcat.AutoPoll,
      PollInterval: time.Second * 120 /* polling interval in seconds */}
    • Lazy:
    configcat.Config{SDKKey: "<PLACE-YOUR-SDK-KEY-HERE>", 
      PollingMode: configcat.Lazy,
      PollInterval: time.Second * 120 /* cache TTL in seconds */}
    • Manual:
    configcat.Config{SDKKey: "<PLACE-YOUR-SDK-KEY-HERE>", 
      PollingMode: configcat.Manual}
  • Added a new configuration option ChangeNotify to subscribe to configuration changes.
    configcat.Config{SDKKey: "<PLACE-YOUR-SDK-KEY-HERE>", 
      ChangeNotify: func() {
          // here you can subscribe to configuration changes
      }}

Evaluation of a feature flag / setting value:

  • The GetValue(), GetValueForUser() generic methods were replaced by typed ones that accept an optional User parameter:
    GetBoolValue(key string, defaultValue bool, user User) bool
    GetIntValue(key string, defaultValue int, user User) int
    GetFloatValue(key string, defaultValue float64, user User) float64
    GetStringValue(key string, defaultValue string, user User) string

    When you don't want to pass a User, just use these methods with nil as the User parameter.

  • All *Async methods were removed, due to the fact that all Sync methdos could be used in Async context with goroutines.

Other changes

  • The Refresh(context) method now gets a context.Context parameter.
  • Added a new RefreshIfOlder(context, time) method to give more control over when the local cache gets updated.
  • The ConfigCache interface methods now gets an additional context.Context parameter.
  • The way of the User object creation changed:
    • Old: user := configcat.NewUser("<USER-IDENTIFIER>")
    • New: user := &configcat.UserData{Identifier: "<USER-IDENTIFIER>"}

New features:

  • Introduced new options to create a User object, here you can read more.
  • Introduced Snapshots, here you can read more.

Included PRs:

  • #27 v7: refactor config fetching and Client API
  • #30 v7: reflection-based API
  • #31 v7: add get-only benchmark
  • #32 v7: implement snapshots
  • #33 v7: add generic value-get methods
  • #34 v7: avoid panic when nil snapshot is used
  • #35 v7: avoid copying mutex when copying configuration
  • #36 v7: always refresh when asked

Special thanks to @rogpeppe for the contribution!

v6.1.1

24 Nov 01:16
f334a2a
Compare
Choose a tag to compare

Revert to Contains semantics when isOneOf or isNotOneOf comparators are used to evaluate a user attribute.

v6.1.0

20 Nov 17:01
54053a5
Compare
Choose a tag to compare

Code quality and performance improvements from these PRs:

  • #13 more efficient evaluation
  • #15 simplify client logic
  • #16 remove policy factory
  • #17 use less embedding in policy implementations
  • #18 return pointer fron newConfigRefresher
  • #19 simplify configFetcher code slightly
  • #20 refactor async code
  • #21 avoid internal tests
  • #22 more external tests
  • #23 preprocess config for evaluation
  • #24 restore missed logging messages

Special thanks to @rogpeppe for the contribution and the massive amount of work on these PRs.