backup

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backup

type Backup struct {
	Conn    *grpc.ClientConn
	Log     Logger
	Timeout time.Duration
	Dir     string
	// contains filtered or unexported fields
}

func (*Backup) Backup

func (b *Backup) Backup() (Manifest, error)

func (*Backup) Restore

func (b *Backup) Restore() error

type Clock

type Clock interface {
	Now() time.Time
}

type Logger

type Logger interface {
	Info(args ...interface{})
	Infof(msg string, args ...interface{})
}

type Manifest

type Manifest struct {
	Started  time.Time       `json:"started"`
	Finished time.Time       `json:"finished"`
	Tables   []ManifestTable `json:"tables"`
}

Manifest a backup manifest containing a backup info.

type ManifestTable

type ManifestTable struct {
	Name     string `json:"name"`
	FileName string `json:"file_name"`
	MD5      string `json:"md5"`
}

ManifestTable a backup table descriptor.

type Writer

type Writer struct {
	Sender regattapb.Maintenance_RestoreClient
}

func (Writer) Write

func (g Writer) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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