Documentation
¶
Overview ¶
Package legacy holds what the Semaphore rename needs to keep the names of GO Feature Flag working: the canonical Semaphore name is always read first and the legacy name is accepted as an alias. Using a legacy name logs one warning per Warner and per kind of name, never one per request.
Index ¶
Constants ¶
const ( KindConfigFile = "config-file" KindFlagFile = "flag-file" KindEnvPrefix = "env-prefix" KindEvaluationContext = "evaluation-context-key" )
Kinds of legacy names, one warning is logged per kind.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LogFunc ¶
type LogFunc func(kind, message string)
LogFunc receives the warning for one kind of legacy name.
type Warner ¶
type Warner struct {
// contains filtered or unexported fields
}
Warner logs one warning per kind of legacy name. Whoever reads names that may be legacy owns a Warner (the relay's configuration loader, the evaluation Service of a client, a CLI command), so that two of them never share the "already warned" state.