initial commit

This commit is contained in:
ston1th 2020-11-12 02:09:20 +01:00
commit c0616030c6
14 changed files with 1468 additions and 0 deletions

32
pkg/cluster/state.go Normal file
View 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() {
}