meta

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

func ReviewCompact

func ReviewCompact(volumeDir string, node uint64, watcher func(*CompactInfo, int64)) error

Types

type CompactInfo

type CompactInfo struct {
	Index uint64 `json:"Index"`
	Term  uint64 `json:"Term"`
}

type DB

type DB struct {
	// contains filtered or unexported fields
}

func Open

func Open(volumeDir string, opts ...Option) (*DB, error)

func (*DB) Close

func (db *DB) Close()

func (*DB) GetApply

func (db *DB) GetApply(node uint64) (uint64, error)

func (*DB) GetCommit

func (db *DB) GetCommit(node uint64) (uint64, error)

func (*DB) GetCompact

func (db *DB) GetCompact(node uint64) (CompactInfo, error)

func (*DB) GetConfState

func (db *DB) GetConfState(node uint64) (raftpb.ConfState, error)

func (*DB) GetHardState

func (db *DB) GetHardState(node uint64) (raftpb.HardState, error)

func (*DB) GetRaftDetail

func (db *DB) GetRaftDetail(node uint64) (d RaftDetail, err error)

func (*DB) PutApply

func (db *DB) PutApply(node uint64, app uint64) error

func (*DB) PutCompact

func (db *DB) PutCompact(node uint64, info CompactInfo) error

func (*DB) PutHardState

func (db *DB) PutHardState(node uint64, hs raftpb.HardState) error

type Option

type Option func(*config)

func ReadOnly

func ReadOnly() Option

func SkipMetaStore

func SkipMetaStore() Option

type RaftDetail

type RaftDetail struct {
	ConfState raftpb.ConfState `json:"ConfState"`
	HardState raftpb.HardState `json:"HardState"`
	Commit    uint64           `json:"Commit"`
	Apply     uint64           `json:"Apply"`
	Compact   CompactInfo      `json:"Compact"`
}

Jump to

Keyboard shortcuts

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