Documentation
¶
Overview ¶
Package app assembles the backup module as a process of its own (docs/decisions/0071): the storage it reads an installation from, the archive bucket and the age recipients it writes to (or, in the restore role, the age identity it reads with), the audit trail, and the job that runs under the backup lease (internal/backup/job). It has no listener and no inbound API but the module-call methods of internal/backup/rpc.
Index ¶
- func Creator() string
- type App
- func (a *App) Close() error
- func (a *App) Flush(ctx context.Context) error
- func (a *App) List(ctx context.Context) ([]job.Info, error)
- func (a *App) PreviewRestore(ctx context.Context, backupID string) (*restore.Report, error)
- func (a *App) Prune(ctx context.Context, actor audit.Actor, dryRun bool) (job.Pass, string, error)
- func (a *App) RPC() *modcall.Server
- func (a *App) Restore(ctx context.Context, req restorejob.Request) (restorejob.Result, error)
- func (a *App) RestoreStatus(ctx context.Context) (restorejob.Status, error)
- func (a *App) Role() string
- func (a *App) Run(ctx context.Context, req job.Request) (job.Result, error)
- func (a *App) Status(ctx context.Context) (job.Status, error)
- func (a *App) Verify(ctx context.Context, id string, ids []age.Identity) (Verification, error)
- type Config
- type Verification
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type App ¶
type App struct {
// contains filtered or unexported fields
}
App is the assembled module.
func (*App) Close ¶
Close closes the audit emitter, which delivers what its queue holds within its timeout and drops the rest, and the ports.
func (*App) Flush ¶
Flush delivers the audit records still queued: a Lambda function calls it before an invocation returns, since the process is frozen after it.
func (*App) PreviewRestore ¶
PreviewRestore reports what restoring a backup would do and writes nothing.
func (*App) Restore ¶
func (a *App) Restore(ctx context.Context, req restorejob.Request) (restorejob.Result, error)
Restore starts a restore or continues the unfinished one, see restorejob.Job.Start. Only the restore role has one.
func (*App) RestoreStatus ¶
RestoreStatus is the latest restores and the maintenance flags.
func (*App) Run ¶
Run runs one backup (or continues one), see job.Job.Run.
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config is what the module is made of, built from its document.
func FromDocument ¶
func FromDocument(doc *config.SluisBackup) (Config, error)
FromDocument builds the settings from the document already read.
func (Config) AsRole ¶
AsRole is the configuration acting as role: the command line's `sluis restore` is the restore role whatever the document says.
func (Config) AuditConfig ¶
AuditConfig is the audit configuration the module runs with, from the adapter table its document resolves to. It opens nothing; a document whose audit adapter the build does not serve, or whose settings it does not decode, is refused here as it is at start.
func (Config) Role ¶
Role is config.BackupRoleBackup or config.BackupRoleRestore.
type Verification ¶ added in v1.76.1
type Verification struct {
ID string `json:"id"`
// Object is the encrypted object as its sidecar describes it; its size
// and SHA-256 matched.
Object backup.ObjectInfo `json:"object"`
// Decrypted is whether an identity was given and the archive decrypted,
// and every member matched the manifest.
Decrypted bool `json:"decrypted"`
Modules int `json:"modules"`
Records int64 `json:"records"`
Files int `json:"files,omitempty"`
}
Verification is what `sluis backup verify` found.