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

package resourceshookcontext

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


Package Files


func NewHookContextFacade Uses

func NewHookContextFacade(st *state.State, unit *state.Unit) (interface{}, error)

NewHookContextFacade adapts NewUnitFacade for facade registration.

type UnitDataStore Uses

type UnitDataStore interface {
    // ListResources lists all the resources for the application.
    ListResources() (resource.ApplicationResources, error)

UnitDataStore exposes the data storage functionality needed here. All functionality is tied to the unit's application.

type UnitFacade Uses

type UnitFacade struct {
    //DataStore is the data store used by the facade.
    DataStore UnitDataStore

UnitFacade is the resources portion of the uniter's API facade.

func NewStateFacade Uses

func NewStateFacade(ctx facade.Context) (*UnitFacade, error)

NewStateFacade provides the signature to register this resource facade

func NewUnitFacade Uses

func NewUnitFacade(dataStore UnitDataStore) *UnitFacade

NewUnitFacade returns the resources portion of the uniter's API facade.

func (UnitFacade) GetResourceInfo Uses

func (uf UnitFacade) GetResourceInfo(args params.ListUnitResourcesArgs) (params.UnitResourcesResult, error)

GetResourceInfo returns the resource info for each of the given resource names (for the implicit application). If any one is missing then the corresponding result is set with errors.NotFound.

Package resourceshookcontext imports 8 packages (graph) and is imported by 4 packages. Updated 2020-08-28. Refresh now. Tools for package owners.