crossmodel

package
v0.0.0-...-a0d7459 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2017 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

Package crossmodel provides an API server facade for managing cross model relations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

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

API implements the cross model interface and is the concrete implementation of the api end point.

func NewAPI

func NewAPI(ctx facade.Context) (*API, error)

NewAPI returns a new cross model API facade.

func (*API) ApplicationOffers

func (api *API) ApplicationOffers(urls params.ApplicationURLs) (params.ApplicationOffersResults, error)

ApplicationOffers gets details about remote applications that match given URLs.

func (*API) FindApplicationOffers

func (api *API) FindApplicationOffers(filters params.OfferFilters) (params.FindApplicationOffersResults, error)

FindApplicationOffers gets details about remote applications that match given filter.

func (*API) ListApplicationOffers

func (api *API) ListApplicationOffers(filters params.OfferFilters) (params.ListApplicationOffersResults, error)

ListApplicationOffers gets deployed details about application offers that match given filter. The results contain details about the deployed applications such as connection count.

func (*API) Offer

Offer makes application endpoints available for consumption at a specified URL.

type Application

type Application interface {
	Charm() (ch Charm, force bool, err error)
	CharmURL() (curl *charm.URL, force bool)
	Name() string
}

type Backend

type Backend interface {
	Application(name string) (Application, error)
	Model() (Model, error)
	ModelUUID() string
	ModelsForUser(user names.UserTag) ([]UserModel, error)
	RemoteConnectionStatus(offerName string) (RemoteConnectionStatus, error)
}

Backend provides selected methods off the state.State struct.

type Charm

type Charm interface {
	Meta() *charm.Meta
}

type Model

type Model interface {
	UUID() string
	Name() string
	Owner() names.UserTag
}

type RemoteConnectionStatus

type RemoteConnectionStatus interface {
	ConnectionCount() int
}

type StatePool

type StatePool interface {
	// Get returns a State for a given model from the pool.
	Get(modelUUID string) (Backend, func(), error)
}

StatePool provides the subset of a state pool required by the crossmodel facade.

type UserModel

type UserModel interface {
	Model() Model
}

Jump to

Keyboard shortcuts

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