ubtypes

package
v0.0.0-...-05a15ff Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backup

type Backup struct {
	Started time.Time
	Target  BackupTarget
}

func BackupForTarget

func BackupForTarget(target BackupTarget) Backup

makes a backup struct with "now" as start timestamp

type BackupTarget

type BackupTarget struct {
	ServiceName   string // storage is partitioned by service name
	Snapshotter   Snapshotter
	TaskId        string // instance/container/... ID to discern multiple replicas or process lifecycles if needed
	FileExtension string // ".sql" | ".tar" etc to identify what's inside compression+encryption wrapping
}

type Snapshotter

type Snapshotter interface {
	// describes, for logging purposes, how the snapshot will be obtained
	Describe() string
	// snapshots a target into a sink. usable only once.
	CreateSnapshot(snapshotSink io.Writer) error
}

func CustomStream

func CustomStream(fn func(sink io.Writer) error) Snapshotter

Jump to

Keyboard shortcuts

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