Skip to main content

election

Hold election.

def election(
state: object,
id: string,
topic: string,
action: string = None,
**kwargs: dict
) - > null

Hold election.

Parameters

NameTypeDescription
stateobjectThe current application state containing the consumer and gossip configuration.
idstringA unique identifier for the specific election instance.
topicstringThe subject or resource category the election is being held for.
actionstring = NoneThe specific task or command to be executed by the actor that wins the election.
**kwargsdictAdditional keyword arguments passed to the election handler.

Returns

TypeDescription
nullNo value is returned; the election process is initiated asynchronously via the gossip protocol.