FlagProvider
public protocol FlagProvider
The protocol that defines a set of methods and properties for retrieving flag values and their corresponding config values.
-
Returns data for the flag.
Declaration
Swift
func get<T>(for flag: VarioqubFlag, type: T.Type, defaultValue: T?) -> T where T : VarioqubInitializableByValue
Parameters
flag
The flag.
type
The type of the return value.
defaultValue
The function that returns the default value if no value available for this flag could be found.
Return Value
The specific type value.
-
Returns data for the flag.
Declaration
Swift
func getValue(for flag: VarioqubFlag) -> VarioqubConfigValue
Parameters
flag
The flag name.
Return Value
The value for the flag, or value with
defaultValue
if nothing found. -
All active flags with values.
Declaration
Swift
var allItems: [VarioqubFlag : VarioqubConfigValue] { get }
-
All active keys.
Declaration
Swift
var allKeys: Set<VarioqubFlag> { get }