revision

package
v0.0.0-...-f584327 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 18 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL