juju: github.com/juju/juju/apiserver/facades/agent/unitassigner Index | Files

package unitassigner

import "github.com/juju/juju/apiserver/facades/agent/unitassigner"


Package Files


type API Uses

type API struct {
    // contains filtered or unexported fields

API implements the functionality for assigning units to machines.

func New Uses

func New(st *state.State, res facade.Resources, _ facade.Authorizer) (*API, error)

New returns a new unitAssigner api instance.

func (*API) AssignUnits Uses

func (a *API) AssignUnits(args params.Entities) (params.ErrorResults, error)

AssignUnits assigns the units with the given ids to the correct machine. The error results are returned in the same order as the given entities.

func (*API) SetAgentStatus Uses

func (a *API) SetAgentStatus(args params.SetStatus) (params.ErrorResults, error)

SetAgentStatus will set status for agents of Units passed in args, if one of the args is not an Unit it will fail.

func (*API) WatchUnitAssignments Uses

func (a *API) WatchUnitAssignments() (params.StringsWatchResult, error)

WatchUnitAssignments returns a strings watcher that is notified when new unit assignments are added to the db.

Package unitassigner imports 8 packages (graph) and is imported by 4 packages. Updated 2020-09-14. Refresh now. Tools for package owners.