backups

package
v0.0.0-...-b0bff92 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2021 License: AGPL-3.0 Imports: 17 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.

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.

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