Get desktop application:
View/edit binary Protocol Buffers messages
The election service exposes client-side election facilities as a gRPC interface.
Campaign waits to acquire leadership in an election, returning a LeaderKey representing the leadership if successful. The LeaderKey can then be used to issue new values on the election, transactionally guard API requests on leadership still being held, and resign from the election.
option (google.api.http) = { post: "/v3/election/campaign" body: "*" };
name is the election's identifier for the campaign.
lease is the ID of the lease attached to leadership of the election. If the lease expires or is revoked before resigning leadership, then the leadership is transferred to the next campaigner, if any.
value is the initial proclaimed value set when the campaigner wins the election.
leader describes the resources used for holding leadership of the election.
Proclaim updates the leader's posted value with a new value.
option (google.api.http) = { post: "/v3/election/proclaim" body: "*" };
leader is the leadership hold on the election.
value is an update meant to overwrite the leader's current value.
Leader returns the current election proclamation, if any.
option (google.api.http) = { post: "/v3/election/leader" body: "*" };
Observe streams election proclamations in-order as made by the election's elected leaders.
option (google.api.http) = { post: "/v3/election/observe" body: "*" };
Resign releases election leadership so other campaigners may acquire leadership on the election.
option (google.api.http) = { post: "/v3/election/resign" body: "*" };
leader is the leadership to relinquish by resignation.
Used in:
, ,name is the election identifier that corresponds to the leadership key.
key is an opaque key representing the ownership of the election. If the key is deleted, then leadership is lost.
rev is the creation revision of the key. It can be used to test for ownership of an election during transactions by testing the key's creation revision matches rev.
lease is the lease ID of the election leader.
Used as request type in: Election.Leader, Election.Observe
name is the election identifier for the leadership information.
Used as response type in: Election.Leader, Election.Observe
kv is the key-value pair representing the latest leader update.