Versions in this module Expand all Collapse all v0 v0.1.0 May 8, 2026 Changes in this version + const CommandTypeRouteSync + const CommandTypeSnapshotUpdate + var ErrDisabled = errors.New("raft disabled") + func WithCluster(config Config) gateway.Option + type Command struct + Raw json.RawMessage + Routes *collectionlist.List[RouteRecord] + Snapshot *SnapshotUpdate + Type string + type Config struct + BindAddr string + Bootstrap bool + DataDir string + Enabled bool + NodeID string + func DefaultConfig() Config + type Node struct + func New(config Config, logger *slog.Logger) (*Node, error) + func (n *Node) AddVoter(id, address string, timeout time.Duration) error + func (n *Node) AppliedState() State + func (n *Node) Apply(data []byte, timeout time.Duration) error + func (n *Node) IsEnabled() bool + func (n *Node) IsLeader() bool + func (n *Node) Peers() (*collectionlist.List[gateway.ClusterPeer], error) + func (n *Node) RemoveServer(id string, timeout time.Duration) error + func (n *Node) Shutdown() error + func (n *Node) Status() *mapping.Map[string, any] + type Peer struct + Address string + ID string + Suffrage string + type RouteRecord struct + Entrypoint string + Host string + Method string + Name string + PathPrefix string + Service string + type SnapshotUpdate struct + BuiltAt string + ProxyEngine string + Routes int + Services int + type State struct + AppliedAt time.Time + Raw json.RawMessage + Routes *collectionlist.List[RouteRecord] + Snapshot *SnapshotUpdate + Version uint64