Documentation ¶
Overview ¶
Package recoveryserver implements the gRPC endpoints for recovering a restarting node.
The endpoint is only available for control-plane nodes, worker nodes should only rejoin the cluster using Constellation's JoinService.
This endpoint can be used by an admin in case of a complete cluster shutdown, in which case a node is unable to rejoin the cluster automatically.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RecoveryServer ¶
type RecoveryServer struct { recoverproto.UnimplementedAPIServer // contains filtered or unexported fields }
RecoveryServer is a gRPC server that can be used by an admin to recover a restarting node.
func New ¶
func New(issuer atls.Issuer, factory kmsFactory, log *logger.Logger) *RecoveryServer
New returns a new RecoveryServer.
func (*RecoveryServer) Recover ¶
func (s *RecoveryServer) Recover(ctx context.Context, req *recoverproto.RecoverMessage) (*recoverproto.RecoverResponse, error)
Recover is a bidirectional streaming RPC that is used to send recovery keys to a restarting node.
func (*RecoveryServer) Serve ¶
func (s *RecoveryServer) Serve(ctx context.Context, listener net.Listener, diskUUID string) (diskKey, measurementSecret []byte, err error)
Serve starts the recovery server. It blocks until a recover request call is successful. The server will shut down when the call is successful and the keys are returned. Additionally, the server can be shutdown by canceling the context.
type StubServer ¶
type StubServer struct {
// contains filtered or unexported fields
}
StubServer implements the RecoveryServer interface but does not actually start a server.
func NewStub ¶
func NewStub(log *logger.Logger) *StubServer
NewStub returns a new stubbed RecoveryServer. We use this to avoid having to start a server for worker nodes, since they don't require manual recovery.