kubernetes/vendor/go.etcd.io/etcd/server/v3/etcdserver/cindex/cindex.go

type Backend

type ConsistentIndexer

type consistentIndex

// NewConsistentIndex creates a new consistent index.
// If `be` is nil, it must be set (SetBackend) before first access using `ConsistentIndex()`.
func NewConsistentIndex(be Backend) ConsistentIndexer {}

func (ci *consistentIndex) ConsistentIndex() uint64 {}

func (ci *consistentIndex) UnsafeConsistentIndex() uint64 {}

func (ci *consistentIndex) SetConsistentIndex(v uint64, term uint64) {}

func (ci *consistentIndex) UnsafeSave(tx backend.BatchTx) {}

func (ci *consistentIndex) SetBackend(be Backend) {}

func (ci *consistentIndex) ConsistentApplyingIndex() (uint64, uint64) {}

func (ci *consistentIndex) SetConsistentApplyingIndex(v uint64, term uint64) {}

func NewFakeConsistentIndex(index uint64) ConsistentIndexer {}

type fakeConsistentIndex

func (f *fakeConsistentIndex) ConsistentIndex() uint64 {}

func (f *fakeConsistentIndex) ConsistentApplyingIndex() (uint64, uint64) {}

func (f *fakeConsistentIndex) UnsafeConsistentIndex() uint64 {}

func (f *fakeConsistentIndex) SetConsistentIndex(index uint64, term uint64) {}

func (f *fakeConsistentIndex) SetConsistentApplyingIndex(index uint64, term uint64) {}

func (f *fakeConsistentIndex) UnsafeSave(_ backend.BatchTx) {}

func (f *fakeConsistentIndex) SetBackend(_ Backend)         {}

// UnsafeCreateMetaBucket creates the `meta` bucket (if it does not exists yet).
func UnsafeCreateMetaBucket(tx backend.BatchTx) {}

// CreateMetaBucket creates the `meta` bucket (if it does not exists yet).
func CreateMetaBucket(tx backend.BatchTx) {}

// unsafeGetConsistentIndex loads consistent index & term from given transaction.
// returns 0,0 if the data are not found.
// Term is persisted since v3.5.
func unsafeReadConsistentIndex(tx backend.ReadTx) (uint64, uint64) {}

// ReadConsistentIndex loads consistent index and term from given transaction.
// returns 0 if the data are not found.
func ReadConsistentIndex(tx backend.ReadTx) (uint64, uint64) {}

func UnsafeUpdateConsistentIndex(tx backend.BatchTx, index uint64, term uint64) {}

func UpdateConsistentIndex(tx backend.BatchTx, index uint64, term uint64) {}