juju: github.com/juju/juju/apiserver/facades/controller/singular Index | Files

package singular

import "github.com/juju/juju/apiserver/facades/controller/singular"

Index

Package Files

singular.go

type Backend Uses

type Backend interface {
    // ControllerTag tells the Facade which controller it should consider
    // requests for.
    ControllerTag() names.ControllerTag

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

Backend supplies capabilities required by a Facade.

type Facade Uses

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

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

func NewExternalFacade Uses

func NewExternalFacade(context facade.Context) (*Facade, error)

NewExternalFacade is for API registration.

func NewFacade Uses

func NewFacade(backend Backend, claimer lease.Claimer, 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 Uses

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 controller, or not on behalf of the connected ModelManager machine, will be rejected.)

func (*Facade) Wait Uses

func (facade *Facade) Wait(ctx context.Context, 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 or controller will be rejected.)

Package singular imports 9 packages (graph) and is imported by 3 packages. Updated 2019-08-26. Refresh now. Tools for package owners.