Documentation ¶
Overview ¶
Package node provides all functionality within arrebato regarding nodes. This includes the gRPC service implementation.
Index ¶
- type GRPC
- func (svr *GRPC) Backup(_ *nodesvc.BackupRequest, stream nodesvc.NodeService_BackupServer) error
- func (svr *GRPC) Describe(_ context.Context, _ *nodesvc.DescribeRequest) (*nodesvc.DescribeResponse, error)
- func (svr *GRPC) Register(registrar grpc.ServiceRegistrar, health *health.Server)
- func (svr *GRPC) Watch(_ *nodesvc.WatchRequest, server nodesvc.NodeService_WatchServer) error
- type Info
- type Raft
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GRPC ¶
type GRPC struct {
// contains filtered or unexported fields
}
The GRPC type is a nodesvc.NodeServiceServer implementation that handles inbound gRPC requests to get information on the node.
func NewGRPC ¶
NewGRPC returns a new instance of the GRPC type that returns node information based on the Raft state.
func (*GRPC) Backup ¶
func (svr *GRPC) Backup(_ *nodesvc.BackupRequest, stream nodesvc.NodeService_BackupServer) error
Backup the server state, writing it to the outbound stream.
func (*GRPC) Describe ¶
func (svr *GRPC) Describe(_ context.Context, _ *nodesvc.DescribeRequest) (*nodesvc.DescribeResponse, error)
Describe the node.
func (*GRPC) Register ¶
func (svr *GRPC) Register(registrar grpc.ServiceRegistrar, health *health.Server)
Register the GRPC service onto the grpc.ServiceRegistrar.
func (*GRPC) Watch ¶
func (svr *GRPC) Watch(_ *nodesvc.WatchRequest, server nodesvc.NodeService_WatchServer) error
Watch the node state, writing data to the server stream when the leadership or known peers changes.
Click to show internal directories.
Click to hide internal directories.