snap

package
v2.0.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2015 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoSnapshot    = errors.New("snap: no available snapshot")
	ErrEmptySnapshot = errors.New("snap: empty snapshot")
	ErrCRCMismatch   = errors.New("snap: crc mismatch")
)

Functions

func Read

func Read(snapname string) (*raftpb.Snapshot, error)

Read reads the snapshot named by snapname and returns the snapshot.

Types

type Snapshotter

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

func New

func New(dir string) *Snapshotter

func (*Snapshotter) Load

func (s *Snapshotter) Load() (*raftpb.Snapshot, error)

func (*Snapshotter) SaveSnap

func (s *Snapshotter) SaveSnap(snapshot raftpb.Snapshot) error

Directories

Path Synopsis
Package snappb is a generated protocol buffer package.
Package snappb is a generated protocol buffer package.

Jump to

Keyboard shortcuts

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