server

package
v0.0.0-...-a743c3d Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cluster

type Cluster struct {
	Storage *cache.Cache

	RaftDir  string
	RaftBind string
	// contains filtered or unexported fields
}

func NewStore

func NewStore(ch *cache.Cache, raftDir, raftBind string) *Cluster

func (*Cluster) SetInmem

func (s *Cluster) SetInmem()

func (*Cluster) Start

func (s *Cluster) Start(nodeId string, isLeader bool) error

type Server

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

func NewServer

func NewServer(addr, raftDir, raftBind string) *Server

func (*Server) Close

func (s *Server) Close()

func (*Server) Run

func (s *Server) Run(nodeId string, isLeader bool) error

Jump to

Keyboard shortcuts

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