Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { // SetCurrentRevision sets the revision of backend SetCurrentRevision(uint64) }
type LeaderRevision ¶
type LeaderRevision struct { // Revision is the revision of leader Revision uint64 }
LeaderRevision is the data return by leader
type RevisionSyncer ¶
type RevisionSyncer interface { // SyncReadRevision fetch the latest revision from leader and set it in backend // if this instance is follower. otherwise, do nothing. SyncReadRevision() error // Close closes syncer Close() error }
func NewRevisionSyncer ¶
func NewRevisionSyncer(backend Backend, metricCli metrics.Metrics, l leader.LeaderElection, tlsConfig *tls.Config) RevisionSyncer
Click to show internal directories.
Click to hide internal directories.