elector_config_handler (elector v0.3.3)
View SourceModule responsible for handling configuration. These settings can be altered with custom settings in the application environment.
Summary
Functions
Adds new post election hook.
Adds new pre election hook.
Returns the configured boolean value that indicates if election should be triggered automatically when node joins or leaves the cluster. Default value is true.
Returns the candidate cache refresh interval in seconds. Set to 0 to disable periodic refresh (only on node join/leave events). Default value is 0 (disabled - only event-based updates).
Boolean value that indicates if the node is eligible to be a candidate for leader election. Default value is 1true.
Returns the configured election delay. Default value is 1000 (1 second).
Atom indicating if the triggered hook should be executed in the local node or in all nodes. Default value is local.
Returns the configured post election hooks. Default value is [].
Returns the configured pre election hooks. Default value is [].
Returns boolean value indicating weather the quorum size is met or not.
Returns the configured quorum size. This is the number of nodes that must be up and running in order to start an election(including the local node). Default value is 1.
Removes post election hook.
Removes pre election hook.
Returns the configured strategy module. Default value is elector_rt_high_strategy (Node with the highest runtime).
Functions
Adds new post election hook.
Adds new pre election hook.
Returns the configured boolean value that indicates if election should be triggered automatically when node joins or leaves the cluster. Default value is true.
Returns the candidate cache refresh interval in seconds. Set to 0 to disable periodic refresh (only on node join/leave events). Default value is 0 (disabled - only event-based updates).
Boolean value that indicates if the node is eligible to be a candidate for leader election. Default value is 1true.
-spec election_delay() -> Delay :: integer().
Returns the configured election delay. Default value is 1000 (1 second).
Atom indicating if the triggered hook should be executed in the local node or in all nodes. Default value is local.
Returns the configured post election hooks. Default value is [].
Returns the configured pre election hooks. Default value is [].
-spec quorum_check() -> QuorumCheck :: boolean().
Returns boolean value indicating weather the quorum size is met or not.
-spec quorum_size() -> QuorumSize :: integer().
Returns the configured quorum size. This is the number of nodes that must be up and running in order to start an election(including the local node). Default value is 1.
Removes post election hook.
Removes pre election hook.
-spec strategy_module() -> StrategyModule :: module().
Returns the configured strategy module. Default value is elector_rt_high_strategy (Node with the highest runtime).