agenttools

package
v0.0.0-...-0a271de Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: AGPL-3.0 Imports: 14 Imported by: 2

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 AgentToolsAPI

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

AgentToolsAPI implements the API used by the machine model worker.

func NewAgentToolsAPI

func NewAgentToolsAPI(
	modelGetter ModelGetter,
	newEnviron func() (environs.Environ, error),
	findTools toolsFinder,
	envVersionUpdate func(*state.Model, version.Number) error,
	authorizer facade.Authorizer,
	logger corelogger.Logger,
	modelConfigService ModelConfigService,
	modelAgentService ModelAgentService,
) (*AgentToolsAPI, error)

NewAgentToolsAPI creates a new instance of the Model API.

func (*AgentToolsAPI) UpdateToolsAvailable

func (api *AgentToolsAPI) UpdateToolsAvailable(ctx context.Context) error

UpdateToolsAvailable invokes a lookup and further update in environ for new patches of the current tool versions.

type ModelAgentService

type ModelAgentService interface {
	// GetModelTargetAgentVersion returns the target agent version for the
	// entire model. The following errors can be returned:
	// - [github.com/juju/juju/domain/model/errors.NotFound] - When the model does
	// not exist.
	GetModelTargetAgentVersion(ctx context.Context) (version.Number, error)
}

ModelAgentService provides access to the Juju agent version for the model.

type ModelConfigService

type ModelConfigService interface {
	// ModelConfig returns the current config for the model.
	ModelConfig(context.Context) (*config.Config, error)
}

ModelConfigService provides access to the model configuration.

type ModelGetter

type ModelGetter interface {
	Model() (*state.Model, error)
}

ModelGetter represents a struct that can provide a state.Model.

Jump to

Keyboard shortcuts

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