singular

package
v0.0.0-...-4bd6544 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2016 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Backend

type Backend interface {

	// ModelTag tells the Facade what models it should consider requests for.
	ModelTag() names.ModelTag

	// SingularClaimer allows the Facade to make claims.
	SingularClaimer() lease.Claimer
}

Backend supplies capabilities required by a Facade.

type Facade

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

Facade allows controller machines to request exclusive rights to administer some specific model for a limited time.

func NewFacade

func NewFacade(backend Backend, auth facade.Authorizer) (*Facade, error)

NewFacade returns a singular-controller API facade, backed by the supplied state, so long as the authorizer represents a controller machine.

func (*Facade) Claim

func (facade *Facade) Claim(args params.SingularClaims) (result params.ErrorResults)

Claim makes the supplied singular-controller lease requests. (In practice, any requests not for the connection's model, or not on behalf of the connected EnvironManager machine, will be rejected.)

func (*Facade) Wait

func (facade *Facade) Wait(args params.Entities) (result params.ErrorResults)

Wait waits for the singular-controller lease to expire for all supplied entities. (In practice, any requests that do not refer to the connection's model will be rejected.)

Jump to

Keyboard shortcuts

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