Documentation
¶
Overview ¶
Package server provides the gRPC server implementation for cluster sync.
Index ¶
- type Service
- func (s *Service) GetClusterStatus(ctx context.Context, _ *commonv1.Empty) (*clusterv1.ClusterStatusResponse, error)
- func (s *Service) GetEventsInRange(ctx context.Context, req *clusterv1.EventsRangeRequest) (*clusterv1.EventsRangeResponse, error)
- func (s *Service) GetLatestSerial(ctx context.Context, _ *commonv1.Empty) (*clusterv1.LatestSerialResponse, error)
- func (s *Service) GetMemberStatus(ctx context.Context, req *clusterv1.MemberStatusRequest) (*clusterv1.MemberStatusResponse, error)
- func (s *Service) GetMembers(ctx context.Context, _ *commonv1.Empty) (*clusterv1.MembersResponse, error)
- func (s *Service) HandleEventsRange(ctx context.Context, req *commonv1.HTTPRequest) (*commonv1.HTTPResponse, error)
- func (s *Service) HandleLatestSerial(ctx context.Context, req *commonv1.HTTPRequest) (*commonv1.HTTPResponse, error)
- func (s *Service) HandleMembershipEvent(ctx context.Context, req *clusterv1.MembershipEventRequest) (*commonv1.Empty, error)
- func (s *Service) Ready(ctx context.Context, _ *commonv1.Empty) (*commonv1.ReadyResponse, error)
- func (s *Service) Start(ctx context.Context, _ *commonv1.Empty) (*commonv1.Empty, error)
- func (s *Service) Stop(ctx context.Context, _ *commonv1.Empty) (*commonv1.Empty, error)
- func (s *Service) UpdateMembership(ctx context.Context, req *clusterv1.UpdateMembershipRequest) (*commonv1.Empty, error)
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 ¶
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 ¶
func (s *Service) GetEventsInRange(ctx context.Context, req *clusterv1.EventsRangeRequest) (*clusterv1.EventsRangeResponse, error)
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 ¶
func (s *Service) GetMemberStatus(ctx context.Context, req *clusterv1.MemberStatusRequest) (*clusterv1.MemberStatusResponse, error)
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 ¶
Start starts the cluster polling loop.
func (*Service) Stop ¶
Stop stops the cluster polling loop.
Source Files
¶
- service.go