rafter

package
v0.0.0-...-e79a0a0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRaftFSM

func NewRaftFSM(cache *cache.Cache) *raftFSM

NewRaftFSM creates a new Raft finite state machine.

func Rafting

func Rafting(raftFSM *raftFSM, opts RaftServerOpts)

Rafting will start the raft node

Types

type RaftServerOpts

type RaftServerOpts struct {
	ID         string
	ListenAddr string
	IsLeader   bool
	LeaderAddr string
	Log        *gogger.Logger
}

RaftServerOpts represents the options for a Raft server

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL