Documentation ¶
Index ¶
Constants ¶
View Source
const (
KRootDir = "/root"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FsStateMachine ¶
type FsStateMachine struct {
// contains filtered or unexported fields
}
func NewFsStateMachine ¶
func NewFsStateMachine(fs *db.Fs) *FsStateMachine
NewDbStateMachine returns a StateMachine for capturing and restoring the state of an sqlite database.
func (*FsStateMachine) Recovery ¶
func (d *FsStateMachine) Recovery(b []byte) error
Recovery restores the state of the database using the given data.
func (*FsStateMachine) Save ¶
func (d *FsStateMachine) Save() ([]byte, error)
Save captures the state of the database. The caller must ensure that no transaction is taking place during this call.
http://sqlite.org/howtocorrupt.html states it is safe to do this as long as no transaction is in progress.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
The raftd server is a combination of the Raft server and an HTTP server which acts as the transport.
func (*Server) HandleFunc ¶
This is a hack around Gorilla mux not providing the correct net/http HandleFunc() interface.
Click to show internal directories.
Click to hide internal directories.