Documentation
¶
Index ¶
- func RecoveryClusterToken(ctx context.Context, archive string, identity Identity) (string, error)
- type Endpoint
- type EtcdctlSource
- type Identity
- type IsolatedEtcdutl
- type Metadata
- type RecoveryReadiness
- type RestorePlan
- type Restorer
- type SnapshotInfo
- type Source
- type Store
- func (s Store) CreateSnapshot(ctx context.Context) (Metadata, error)
- func (s Store) PrepareRestore(ctx context.Context, destination string) (RestorePlan, error)
- func (s Store) Restore(ctx context.Context, plan RestorePlan, client Restorer) error
- func (s Store) VerifyOperationalRecovery(ctx context.Context, plan RestorePlan, client Restorer, ...) error
- func (s Store) VerifyRecovery(ctx context.Context, plan RestorePlan, client Restorer) error
- func (s Store) VerifySnapshot(ctx context.Context) (Metadata, error)
- type TLSFiles
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RecoveryClusterToken ¶
RecoveryClusterToken gives all members of a restored snapshot the same new cluster identity, distinct from either live bootstrap token. It is stable on resume and bound to the owned snapshot, not to a guessed directory.
Types ¶
type EtcdctlSource ¶
type EtcdctlSource struct {
Etcdctl string
Etcdutl string
Endpoints []string
Identity Identity
TLS TLSFiles
ScratchDir string
Attest func(context.Context) (SnapshotInfo, error)
}
EtcdctlSource invokes a separately installed trusted etcdctl and etcdutl, never a command inside the distroless etcd container. Credentials remain in protected files; only path locations are passed through the child environment.
func (EtcdctlSource) Snapshot ¶
func (s EtcdctlSource) Snapshot(ctx context.Context, dest io.Writer) (SnapshotInfo, error)
type Identity ¶
type IsolatedEtcdutl ¶
type IsolatedEtcdutl struct {
Binary string
MemberName string
InitialCluster string
InitialAdvertisePeerURLs string
ExpectedMemberNames []string
}
IsolatedEtcdutl restores a validated snapshot with an independent trusted etcdutl binary. The existing cluster data directory is never touched.
func (IsolatedEtcdutl) RestoreIsolated ¶
func (e IsolatedEtcdutl) RestoreIsolated(ctx context.Context, archive, destination string, identity Identity, info SnapshotInfo) error
func (IsolatedEtcdutl) VerifyIsolated ¶
func (e IsolatedEtcdutl) VerifyIsolated(ctx context.Context, destination string, identity Identity, info SnapshotInfo) error
type RecoveryReadiness ¶
type RecoveryReadiness interface {
VerifyEtcdQuorum(context.Context, Identity, SnapshotInfo) error
VerifyPatroniDCS(context.Context, Identity, SnapshotInfo) error
}
RecoveryReadiness is supplied by the Core/Patroni orchestrator. Verification must prove both restored etcd quorum and the Patroni DCS consumer state.
type RestorePlan ¶
type RestorePlan struct {
Archive, Destination string
Identity Identity
Info SnapshotInfo
SHA256 string
}
type Restorer ¶
type Restorer interface {
RestoreIsolated(context.Context, string, string, Identity, SnapshotInfo) error
VerifyIsolated(context.Context, string, Identity, SnapshotInfo) error
}
Restorer must implement isolated etcdutl snapshot restore semantics: never execute inside the running distroless etcd container.
type SnapshotInfo ¶
type Store ¶
func (Store) PrepareRestore ¶
func (Store) VerifyOperationalRecovery ¶
func (s Store) VerifyOperationalRecovery(ctx context.Context, plan RestorePlan, client Restorer, readiness RecoveryReadiness) error
VerifyOperationalRecovery never treats local files as proof of HA recovery.