backups

package
v0.0.0-...-9ec3720 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2021 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateResult

func CreateResult(meta *backups.Metadata, filename string) params.BackupsMetadataResult

CreateResult updates the result with the information in the metadata value.

func MetadataFromResult

func MetadataFromResult(result params.BackupsMetadataResult) *backups.Metadata

MetadataFromResult returns a new Metadata based on the result. The ID of the metadata is not set. Call meta.SetID() if that is desired. Likewise with Stored and meta.SetStored().

Types

type API

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

API provides backup-specific API methods.

func NewAPI

func NewAPI(backend Backend, resources facade.Resources, authorizer facade.Authorizer) (*API, error)

NewAPI creates a new instance of the Backups API facade.

func NewFacadeV3

func NewFacadeV3(st *state.State, resources facade.Resources, authorizer facade.Authorizer) (*API, error)

NewFacadeV3 provides the required signature for facade registration.

func (*API) Create

Create is the API method that requests juju to create a new backup of its state.

func (*API) Info

Info provides the implementation of the API method.

func (*API) List

List provides the implementation of the API method.

func (*API) Remove

func (a *API) Remove(args params.BackupsRemoveArgs) (params.ErrorResults, error)

Remove deletes the backups defined by ID from the database.

type Backend

type Backend interface {
	IsController() bool
	Machine(id string) (Machine, error)
	MachineSeries(id string) (string, error)
	MongoSession() *mgo.Session
	ModelTag() names.ModelTag
	ModelType() state.ModelType
	ControllerTag() names.ControllerTag
	ModelConfig() (*config.Config, error)
	ControllerConfig() (controller.Config, error)
	StateServingInfo() (controller.StateServingInfo, error)
	ControllerNodes() ([]state.ControllerNode, error)
}

Backend exposes state.State functionality needed by the backups Facade.

type Machine

type Machine interface {

	// InstanceId has machine's cloud instance id.
	InstanceId() (instance.Id, error)

	// PrivateAddress has machine's private address.
	PrivateAddress() (corenetwork.SpaceAddress, error)

	// PublicAddress has machine's public address.
	PublicAddress() (corenetwork.SpaceAddress, error)

	// Tag has machine's tag.
	Tag() names.Tag

	// Series has machine's series.
	Series() string
}

Machine represent machine used in backups.

Jump to

Keyboard shortcuts

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