backups

package
v0.0.0-...-a753888 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: AGPL-3.0 Imports: 20 Imported by: 2

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 Register

func Register(registry facade.FacadeRegistry)

Register is called to expose a package of facades onto a given registry.

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 (*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)
	MachineBase(id string) (corebase.Base, 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

	// Base has machine's base.
	Base() state.Base
}

Machine represent machine used in backups.

Jump to

Keyboard shortcuts

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