resourceshookcontext

package
v0.0.0-...-9ec3720 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2021 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewHookContextFacade

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

NewHookContextFacade adapts NewUnitFacade for facade registration.

Types

type UnitDataStore

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

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

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

NewStateFacade provides the signature to register this resource facade

func NewUnitFacade

func NewUnitFacade(dataStore UnitDataStore) *UnitFacade

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

func (UnitFacade) GetResourceInfo

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.

Jump to

Keyboard shortcuts

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