caasfirewaller

package
v0.0.0-...-56cb166 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2025 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(registry facade.FacadeRegistry)

Register is called to expose a package of facades onto a given registry.

Types

type Application

type Application interface {
	IsExposed() bool
	ApplicationConfig() (config.ConfigAttributes, error)
	Watch() state.NotifyWatcher
}

Application provides the subset of application state required by the CAAS operator facade.

type ApplicationService

type ApplicationService interface {
	// GetApplicationLife looks up the life of the specified application.
	GetApplicationLife(context.Context, string) (life.Value, error)

	// GetUnitLife looks up the life of the specified unit.
	GetUnitLife(context.Context, unit.Name) (life.Value, error)

	// GetApplicationIDByName returns a application ID by application name. It
	// returns an error if the application can not be found by the name.
	GetApplicationIDByName(ctx context.Context, name string) (application.ID, error)
}

ApplicationService provides access to the application service.

type CAASFirewallerState

type CAASFirewallerState interface {
	FindEntity(tag names.Tag) (state.Entity, error)
	Application(string) (Application, error)

	WatchApplications() state.StringsWatcher
}

CAASFirewallerState provides the subset of global state required by the CAAS operator facade.

type Facade

type Facade struct {
	*common.AgentEntityWatcher
	// contains filtered or unexported fields
}

func NewFacade

func NewFacade(
	resources facade.Resources,
	watcherRegistry facade.WatcherRegistry,
	authorizer facade.Authorizer,
	st CAASFirewallerState,
	commonCharmsAPI *charmscommon.CharmInfoAPI,
	appCharmInfoAPI *charmscommon.ApplicationCharmInfoAPI,
	applicationService ApplicationService,
) (*Facade, error)

func (*Facade) ApplicationCharmInfo

func (f *Facade) ApplicationCharmInfo(ctx context.Context, args params.Entity) (params.Charm, error)

ApplicationCharmInfo returns information about an application's charm.

func (*Facade) ApplicationsConfig

func (f *Facade) ApplicationsConfig(ctx context.Context, args params.Entities) (params.ApplicationGetConfigResults, error)

ApplicationsConfig returns the config for the specified applications.

func (*Facade) CharmInfo

func (f *Facade) CharmInfo(ctx context.Context, args params.CharmURL) (params.Charm, error)

CharmInfo returns information about the requested charm.

func (*Facade) IsExposed

func (f *Facade) IsExposed(ctx context.Context, args params.Entities) (params.BoolResults, error)

IsExposed returns whether the specified applications are exposed.

func (*Facade) Life

func (f *Facade) Life(ctx context.Context, args params.Entities) (params.LifeResults, error)

Life returns the life status of the specified applications or units.

func (*Facade) WatchApplications

func (f *Facade) WatchApplications(ctx context.Context) (params.StringsWatchResult, error)

WatchApplications starts a StringsWatcher to watch applications deployed to this model.

Jump to

Keyboard shortcuts

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