storage

package
v0.0.0-...-6ba83c3 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Snapshot

type Snapshot struct {
	raftpb.SnapshotState
	Data io.ReadCloser
}

Snapshot is the state of a system at a particular point in time.

type Snapshotter

type Snapshotter interface {
	Writer(uint64, uint64) (io.WriteCloser, error)
	Reader(uint64, uint64) (io.ReadCloser, error)
	Write(*Snapshot) error
	Read(uint64, uint64) (*Snapshot, error)
	ReadFrom(string) (*Snapshot, error)
}

Snapshotter define a set of functions to read and write snapshots.

type Storage

type Storage interface {
	SaveSnapshot(etcdraftpb.Snapshot) error
	SaveEntries(etcdraftpb.HardState, []etcdraftpb.Entry) error
	Snapshotter() Snapshotter
	Boot([]byte) ([]byte, etcdraftpb.HardState, []etcdraftpb.Entry, *Snapshot, error)
	Exist() bool
	Close() error
}

Storage define a set of functions to persist raft data, To provide durability and ensure data integrity.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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