Documentation ¶
Overview ¶
Package leader implements leader election between cored processes of a Chain Core.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Run ¶
Run runs as a goroutine, trying once every five seconds to become the leader for the core. If it succeeds, then it calls the function lead (for generating or fetching blocks, and for expiring reservations) and enters a leadership-keepalive loop.
Function lead is called when the local process becomes the leader. Its context is canceled when the process is deposed as leader.
The Chain Core has up to a 10-second refractory period after shutdown, during which no process can become the new leader.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.