stateconverter

package
v0.0.0-...-6dcaeb9 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Manifold

func Manifold(cfg ManifoldConfig) dependency.Manifold

Manifold returns a Manifold that encapsulates the stateconverter worker.

func NewConverter

func NewConverter(cfg config) watcher.NotifyHandler

NewConverter returns a new notify watch handler that will convert the given machine & agent to a controller.

Types

type Logger

type Logger interface {
	Tracef(string, ...interface{})
	Debugf(string, ...interface{})
	Criticalf(string, ...interface{})
}

Logger represents the methods used by the worker to log details.

type Machine

type Machine interface {
	Jobs() (*params.JobsResult, error)
	Watch() (watcher.NotifyWatcher, error)
}

Machine represents necessary methods for this worker from the a machiner's machine.

type Machiner

type Machiner interface {
	Machine(tag names.MachineTag) (Machine, error)
}

Machiner represents necessary methods for this worker from the machiner api.

type ManifoldConfig

type ManifoldConfig struct {
	AgentName     string
	APICallerName string
	Logger        Logger

	// A constructor for the machiner API which can be overridden
	// during testing. If omitted, the default client for the machiner
	// facade will be automatically used.
	NewMachinerAPI func(base.APICaller) Machiner
}

ManifoldConfig provides the dependencies for the stateconverter manifold.

func (ManifoldConfig) Validate

func (cfg ManifoldConfig) Validate() error

Validate is called by start to check for bad configuration.

Directories

Path Synopsis
Package mocks is a generated GoMock package.
Package mocks is a generated GoMock package.

Jump to

Keyboard shortcuts

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