fabric

package
v8.7.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Command

type Command struct {
	Op string `json:"operation"`

	TargetPlugin   string `json:"target_plugin,omitempty"`
	TargetEndpoint string `json:"target_endpoint,omitempty"`

	StorePlugin   string `json:"store_plugin,omitempty"`
	StoreEndpoint string `json:"store_endpoint,omitempty"`

	TaskUUID string `json:"task_uuid,omitempty"`

	RestoreKey string `json:"restore_key,omitempty"`

	EncryptType string `json:"encrypt_type,omitempty"`
	EncryptKey  string `json:"encrypt_key,omitempty"`
	EncryptIV   string `json:"encrypt_iv,omitempty"`

	Compression string `json:"compression,omitempty"`
}

type DummyFabric

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

func Dummy

func Dummy(delay int) DummyFabric

func (DummyFabric) Backup

func (f DummyFabric) Backup(task *db.Task, encryption vault.Parameters) scheduler.Chore

func (DummyFabric) Purge

func (f DummyFabric) Purge(task *db.Task) scheduler.Chore

func (DummyFabric) Restore

func (f DummyFabric) Restore(task *db.Task, encryption vault.Parameters) scheduler.Chore

func (DummyFabric) Sleep

func (f DummyFabric) Sleep()

func (DummyFabric) Status

func (f DummyFabric) Status(task *db.Task) scheduler.Chore

func (DummyFabric) TestStore

func (f DummyFabric) TestStore(task *db.Task) scheduler.Chore

type ErrorFabric

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

func Error

func Error(err error) ErrorFabric

func (ErrorFabric) Backup

func (f ErrorFabric) Backup(task *db.Task, _ vault.Parameters) scheduler.Chore

func (ErrorFabric) Error

func (f ErrorFabric) Error() string

func (ErrorFabric) Purge

func (f ErrorFabric) Purge(task *db.Task) scheduler.Chore

func (ErrorFabric) Restore

func (f ErrorFabric) Restore(task *db.Task, _ vault.Parameters) scheduler.Chore

func (ErrorFabric) Status

func (f ErrorFabric) Status(task *db.Task) scheduler.Chore

func (ErrorFabric) TestStore

func (f ErrorFabric) TestStore(task *db.Task) scheduler.Chore

type Fabric

type Fabric interface {
	/* back up a target to a store, encrypt it,
	   and optionally compress it. */
	Backup(*db.Task, vault.Parameters) scheduler.Chore

	/* restore an encrypted archive to a target. */
	Restore(*db.Task, vault.Parameters) scheduler.Chore

	/* check the status of the agent. */
	Status(*db.Task) scheduler.Chore

	/* purge an from cloud storage archive. */
	Purge(*db.Task) scheduler.Chore

	/* test the viability of a storage system. */
	TestStore(*db.Task) scheduler.Chore
}

type LegacyFabric

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

func Legacy

func Legacy(ip string, config *ssh.ClientConfig, db *db.DB) LegacyFabric

func (LegacyFabric) Backup

func (f LegacyFabric) Backup(task *db.Task, encryption vault.Parameters) scheduler.Chore

func (LegacyFabric) Execute

func (f LegacyFabric) Execute(op, id string, command Command) scheduler.Chore

func (LegacyFabric) Purge

func (f LegacyFabric) Purge(task *db.Task) scheduler.Chore

func (LegacyFabric) Restore

func (f LegacyFabric) Restore(task *db.Task, encryption vault.Parameters) scheduler.Chore

func (LegacyFabric) Status

func (f LegacyFabric) Status(task *db.Task) scheduler.Chore

func (LegacyFabric) TestStore

func (f LegacyFabric) TestStore(task *db.Task) scheduler.Chore

Jump to

Keyboard shortcuts

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