Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigRaft ¶
ConfigRaft is the configuration to spawn a new Raft node
type Raft ¶
type Raft struct { Name string Node *graft.Node LogDir string ExpectedClusterSize int NatsAddr string HTTPAddr string ExitChan chan bool ErrChan chan error StateChangeChan chan graft.StateChange OnBecomingLeader func(state graft.State) OnBecomingFollower func(state graft.State) OnBecomingCandidate func(state graft.State) OnClosed func(state graft.State) // contains filtered or unexported fields }
Raft is a structure that represents a Raft node
func NewRaft ¶
func NewRaft(conf ConfigRaft) (*Raft, error)
NewRaft is the constructor for a Raft node
func (*Raft) RunBlocking ¶
Run initiates the quorum participation of this Raft node
type RaftHTTPGet ¶
type RaftHTTPGet struct {
// contains filtered or unexported fields
}
func NewRaftHTTPGet ¶
func NewRaftHTTPGet(raft *Raft) *RaftHTTPGet
func (*RaftHTTPGet) ServeHTTP ¶
func (handler *RaftHTTPGet) ServeHTTP(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.