cluster

package
v1.25.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	*store.Service
	// contains filtered or unexported fields
}

Service class serves as the primary entry point for the Raft layer, managing and coordinating the key functionalities of the distributed consensus protocol.

func New

func New(cfg store.Config) *Service

func (*Service) Close

func (c *Service) Close(ctx context.Context) error

func (*Service) LeaderWithID

func (c *Service) LeaderWithID() (string, string)

LeaderWithID is used to return the current leader address and ID of the cluster. It may return empty strings if there is no current leader or the leader is unknown.

func (*Service) Open

func (c *Service) Open(ctx context.Context, db store.Indexer) error

Open internal RPC service to handle node communication, bootstrap the Raft node, and restore the database state

func (*Service) Ready

func (c *Service) Ready() bool

Directories

Path Synopsis
proto
api

Jump to

Keyboard shortcuts

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