storage

package
v0.0.0-...-c46e59b Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

func NewStorage

func NewStorage(path string) (*Storage, error)

func (*Storage) DeleteRange

func (b *Storage) DeleteRange(min, max uint64) error

func (*Storage) FirstIndex

func (b *Storage) FirstIndex() (uint64, error)

func (*Storage) Get

func (b *Storage) Get(k []byte) ([]byte, error)

func (*Storage) GetLog

func (b *Storage) GetLog(idx uint64, log *raft.Log) error

func (*Storage) GetUint64

func (b *Storage) GetUint64(key []byte) (uint64, error)

func (*Storage) LastIndex

func (b *Storage) LastIndex() (uint64, error)

func (*Storage) Set

func (b *Storage) Set(k, v []byte) error

func (*Storage) SetUint64

func (b *Storage) SetUint64(key []byte, val uint64) error

func (*Storage) StoreLog

func (b *Storage) StoreLog(log *raft.Log) error

func (*Storage) StoreLogs

func (b *Storage) StoreLogs(logs []*raft.Log) error

StoreLogs is used to store a set of raft logs

Jump to

Keyboard shortcuts

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