Documentation ¶
Overview ¶
Package checkincache contains an on-disk cache for check-in responses.
Index ¶
Constants ¶
const CheckInFlagsState = "checkinflags.state"
CheckInFlagsState is the state created by check-in flags.
Variables ¶
This section is empty.
Functions ¶
func ExperimentEnabled ¶ added in v3.19.0
func ExperimentEnabled(kvStore model.KeyValueStore, name string) bool
ExperimentEnabled returns whether a given experiment has been enabled by a previous execution of check-in. Some experiments are disabled by default for different reasons and we use the check-in API to control whether and when they should be enabled.
func ExperimentEnabledKey ¶ added in v3.19.0
ExperimentEnabledKey returns the model.KeyValueStore key to use to know whether a disabled experiment has been enabled via check-in.
func GetFeatureFlag ¶
func GetFeatureFlag(kvStore model.KeyValueStore, name string) bool
GetFeatureFlag returns the value of a check-in feature flag. In case of any error this function will always return a false value.
func Store ¶
func Store(kvStore model.KeyValueStore, resp *model.OOAPICheckInResult) error
Store stores the result of the latest check-in in the given key-value store.
We store check-in feature flags in a file called checkinflags.state. These flags are valid for 24 hours, after which we consider them stale.
Types ¶
This section is empty.