Documentation ¶
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, log *logger.Logger) *RecoveryServer
New returns a new RecoveryServer.
func (*RecoveryServer) Recover ¶
func (s *RecoveryServer) Recover(stream recoverproto.API_RecoverServer) 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.