server

package
v0.0.0-...-75eef08 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Server)

func WithElectionTime

func WithElectionTime(duration time.Duration) Option

WithElectionTime sets the election time for the server

func WithLogger

func WithLogger(log logger.Logger) Option

WithLogger sets the logger for the server

type Server

type Server struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, serverRPC *rpc.Server, peers []string, options ...Option) (*Server, error)

func (*Server) GetStatus

func (s *Server) GetStatus() v1.RaftStatus

GetStatus returns the status of the raft node.

Jump to

Keyboard shortcuts

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