recovery

package
v0.0.0-...-17e6b21 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type QuantumRecovery

type QuantumRecovery struct {
	ID           string
	BackupID     string
	Status       RecoveryStatus
	InitiatedAt  time.Time
	CompletedAt  time.Time
	VerifiedHash string
	RecoveryType string
	ErrorMessage string
	Metadata     map[string]interface{}
}

type QuantumRecoveryManager

type QuantumRecoveryManager struct {
	// contains filtered or unexported fields
}

func NewQuantumRecoveryManager

func NewQuantumRecoveryManager(
	backupMgr *backup.QuantumBackupManager,
	keyExchange *quantum.KeyExchange,
	metrics *metrics.QuantumStorageMetrics,
	tracer tracing.Tracer,
) *QuantumRecoveryManager

func (*QuantumRecoveryManager) ExecuteRecovery

func (qr *QuantumRecoveryManager) ExecuteRecovery(ctx context.Context, recoveryID string) error

func (*QuantumRecoveryManager) GetRecoveryStatus

func (qr *QuantumRecoveryManager) GetRecoveryStatus(ctx context.Context, recoveryID string) (*QuantumRecovery, error)

func (*QuantumRecoveryManager) InitiateRecovery

func (qr *QuantumRecoveryManager) InitiateRecovery(ctx context.Context, backupID string, metadata map[string]interface{}) (*QuantumRecovery, error)

type RecoveryLog

type RecoveryLog struct {
	ID            string
	KeyID         string
	InitiatedAt   time.Time
	CompletedAt   time.Time
	Status        RecoveryStatus
	BackupUsed    string
	VerifiedHash  string
	RecoveryType  string
	ErrorMessage  string
	ApprovedBy    []string
	RequiredVotes int
}

type RecoveryManager

type RecoveryManager struct {
	// contains filtered or unexported fields
}

func NewRecoveryManager

func NewRecoveryManager(
	keyStore *keystore.HSMKeyStore,
	backupMgr *backup.KeyBackupManager,
	metrics *metrics.QuantumStorageMetrics,
	tracer tracing.Tracer,
) *RecoveryManager

func (*RecoveryManager) ApproveRecovery

func (rm *RecoveryManager) ApproveRecovery(ctx context.Context, recoveryID string, approverID string) error

func (*RecoveryManager) ExecuteRecovery

func (rm *RecoveryManager) ExecuteRecovery(ctx context.Context, recoveryID string) error

func (*RecoveryManager) InitiateRecovery

func (rm *RecoveryManager) InitiateRecovery(ctx context.Context, keyID string, recoveryType string, requiredVotes int) (*RecoveryLog, error)

type RecoveryStatus

type RecoveryStatus string
const (
	RecoveryStatusPending  RecoveryStatus = "pending"
	RecoveryStatusApproved RecoveryStatus = "approved"
	RecoveryStatusComplete RecoveryStatus = "complete"
	RecoveryStatusFailed   RecoveryStatus = "failed"
)
const (
	RecoveryStatusInitiated RecoveryStatus = "initiated"
	RecoveryStatusVerifying RecoveryStatus = "verifying"
	RecoveryStatusRestoring RecoveryStatus = "restoring"
	RecoveryStatusComplete  RecoveryStatus = "complete"
	RecoveryStatusFailed    RecoveryStatus = "failed"
)

Jump to

Keyboard shortcuts

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