Documentation ¶
Overview ¶
Code generated by go generate; DO NOT EDIT.
Index ¶
- Variables
- func FindFileInPath(file string, p string) (path string, err error)
- func FindRaftDir(p string) (raftpath string, err error)
- func FindRaftFile(p string) (raftpath string, err error)
- func LogEntries(p string) (<-chan interface{}, <-chan error, error)
- func RaftStateInfo(p string) (store *raftboltdb.BoltStore, firstIdx uint64, lastIdx uint64, err error)
- func RestoreFromArchive(archive io.Reader, filter *nomad.FSMFilter) (*state.StateStore, *raft.SnapshotMeta, error)
- func StateAsMap(store *state.StateStore) map[string][]interface{}
- type FSMHelper
- func (f *FSMHelper) ApplyAll() (index uint64, term uint64, err error)
- func (f *FSMHelper) ApplyNext() (index uint64, term uint64, err error)
- func (f *FSMHelper) ApplyUntil(stopIdx uint64) (idx uint64, term uint64, err error)
- func (f *FSMHelper) Close()
- func (f *FSMHelper) State() *state.StateStore
- func (f *FSMHelper) StateAsMap() map[string][]interface{}
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoMoreLogs = fmt.Errorf("no more logs")
Functions ¶
func FindFileInPath ¶
FindFileInPath searches for file in path p
func FindRaftDir ¶
FindRaftDir finds raft.db and returns parent directory path
func FindRaftFile ¶
FindRaftFile finds raft.db and returns path
func LogEntries ¶
LogEntries reads the raft logs found in the data directory found at the path `p`, and returns a channel of logs, and a channel of warnings. If opening the raft state returns an error, both channels will be nil.
func RaftStateInfo ¶
func RaftStateInfo(p string) (store *raftboltdb.BoltStore, firstIdx uint64, lastIdx uint64, err error)
RaftStateInfo returns info about the nomad state, as found in the passed data-dir directory
func RestoreFromArchive ¶
func RestoreFromArchive(archive io.Reader, filter *nomad.FSMFilter) (*state.StateStore, *raft.SnapshotMeta, error)
func StateAsMap ¶
func StateAsMap(store *state.StateStore) map[string][]interface{}
StateAsMap returns a json-able representation of the state
Types ¶
type FSMHelper ¶
type FSMHelper struct {
// contains filtered or unexported fields
}
func (*FSMHelper) ApplyUntil ¶
ApplyUntil applies all raft entries until (inclusive) the passed index.
func (*FSMHelper) State ¶
func (f *FSMHelper) State() *state.StateStore
func (*FSMHelper) StateAsMap ¶
Click to show internal directories.
Click to hide internal directories.