ActionDispatcher
public protocol ActionDispatcher
An action dispatcher is used to perform actions and perform housekeeping to enable tracking of which features are active at a given time, hooking into logging and analytics etc.
Dispatchers are expected to perform actions synchronously.
If you wish to use your own implementation you must assign it to Flint.dispatcher
at startup.
-
Register an observer to e.g. perform logging or track analytics
Declaration
Swift
func add(observer: ActionDispatchObserver)
-
Perform an implementation of a feature
Declaration
Swift
func perform<FeatureType, ActionType>(request: ActionRequest<FeatureType, ActionType>, completion: Action.Completion) -> Action.Completion.Status where FeatureType : FeatureDefinition, ActionType : Action