election
Hold election.
def election(
state: object,
id: string,
topic: string,
action: string = None,
**kwargs: dict
) - > null
Hold election.
Parameters
| Name | Type | Description |
|---|---|---|
| state | object | The current application state containing the consumer and gossip configuration. |
| id | string | A unique identifier for the specific election instance. |
| topic | string | The subject or resource category the election is being held for. |
| action | string = None | The specific task or command to be executed by the actor that wins the election. |
| **kwargs | dict | Additional keyword arguments passed to the election handler. |
Returns
| Type | Description |
|---|---|
null | No value is returned; the election process is initiated asynchronously via the gossip protocol. |