VarioqubConfigurable
public protocol VarioqubConfigurable : AnyObject
The protocol that provides config-related methods.
-
The callback type for the fetch methods.
Declaration
Swift
typealias FetchCallback = (ConfigFetcherAnswer) -> Void
-
The callback type for the
activateConfig(_:)
method.Declaration
Swift
typealias ActivateCallback = () -> ()
-
Fetches a new config and stores it.
This method doesn’t apply the config, see
activateConfig(_:)
andactivateConfigAndWait()
for that.Declaration
Swift
func fetchConfig(_ callback: FetchCallback?)
Parameters
callback
Called when fetching is completed.
-
Activates a config and notifies via a callback when it completes.
This method doesn’t block the callee.
See also:
activateConfigAndWait()
.Declaration
Swift
func activateConfig(_ callback: ActivateCallback?)
Parameters
callback
Called when activating is completed.
-
Declaration
Swift
func activateConfigAndWait()
-
Fetches a new config and activates it.
Activating a new config isn’t performed if fetching it fails. If the fetch status is
ConfigFetcherAnswer.success
,ConfigFetcherAnswer.throttled
, orConfigFetcherAnswer.cached
, it activates a new config.Declaration
Swift
func fetchAndActivateConfig(_ callback: FetchCallback?)
Parameters
callback
Notifies when fetching and activating is finished.