initial commit
This commit is contained in:
commit
c0616030c6
14 changed files with 1468 additions and 0 deletions
32
pkg/cluster/state.go
Normal file
32
pkg/cluster/state.go
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
package cluster
|
||||
|
||||
import (
|
||||
"io"
|
||||
|
||||
"github.com/hashicorp/raft"
|
||||
)
|
||||
|
||||
type FSM struct {
|
||||
}
|
||||
|
||||
func (fsm FSM) Apply(log *raft.Log) interface{} {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (fsm FSM) Restore(snap io.ReadCloser) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (fsm FSM) Snapshot() (raft.FSMSnapshot, error) {
|
||||
return Snapshot{}, nil
|
||||
}
|
||||
|
||||
type Snapshot struct {
|
||||
}
|
||||
|
||||
func (snapshot Snapshot) Persist(sink raft.SnapshotSink) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (snapshot Snapshot) Release() {
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue