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 ¶
func (a *API) Create(args params.BackupsCreateArgs) (params.BackupsMetadataResult, error)
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.
Click to show internal directories.
Click to hide internal directories.