server

package
v0.55.6 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2026 License: Unlicense Imports: 7 Imported by: 0

Documentation

Overview

Package server provides the gRPC server implementation for cluster sync.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	clusterv1.UnimplementedClusterSyncServiceServer
	// contains filtered or unexported fields
}

Service implements the ClusterSyncServiceServer interface.

func NewService

func NewService(db database.Database, mgr *cluster.Manager) *Service

NewService creates a new cluster sync gRPC service.

func (*Service) GetClusterStatus

func (s *Service) GetClusterStatus(ctx context.Context, _ *commonv1.Empty) (*clusterv1.ClusterStatusResponse, error)

GetClusterStatus returns overall cluster status.

func (*Service) GetEventsInRange

GetEventsInRange returns event info for a serial range.

func (*Service) GetLatestSerial

func (s *Service) GetLatestSerial(ctx context.Context, _ *commonv1.Empty) (*clusterv1.LatestSerialResponse, error)

GetLatestSerial returns the latest serial from this relay's database.

func (*Service) GetMemberStatus

GetMemberStatus returns status for a specific member.

func (*Service) GetMembers

func (s *Service) GetMembers(ctx context.Context, _ *commonv1.Empty) (*clusterv1.MembersResponse, error)

GetMembers returns the current cluster members.

func (*Service) HandleEventsRange

func (s *Service) HandleEventsRange(ctx context.Context, req *commonv1.HTTPRequest) (*commonv1.HTTPResponse, error)

HandleEventsRange proxies GET /cluster/events HTTP requests.

func (*Service) HandleLatestSerial

func (s *Service) HandleLatestSerial(ctx context.Context, req *commonv1.HTTPRequest) (*commonv1.HTTPResponse, error)

HandleLatestSerial proxies GET /cluster/latest HTTP requests.

func (*Service) HandleMembershipEvent

func (s *Service) HandleMembershipEvent(ctx context.Context, req *clusterv1.MembershipEventRequest) (*commonv1.Empty, error)

HandleMembershipEvent processes a cluster membership event (Kind 39108).

func (*Service) Ready

Ready returns whether the service is ready to serve requests.

func (*Service) Start

func (s *Service) Start(ctx context.Context, _ *commonv1.Empty) (*commonv1.Empty, error)

Start starts the cluster polling loop.

func (*Service) Stop

func (s *Service) Stop(ctx context.Context, _ *commonv1.Empty) (*commonv1.Empty, error)

Stop stops the cluster polling loop.

func (*Service) UpdateMembership

func (s *Service) UpdateMembership(ctx context.Context, req *clusterv1.UpdateMembershipRequest) (*commonv1.Empty, error)

UpdateMembership updates cluster membership.

Source Files

  • service.go

Jump to

Keyboard shortcuts

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