hostkeyreporter

package
v0.0.0-...-3d086f3 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: AGPL-3.0 Imports: 13 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Manifold

func Manifold(config ManifoldConfig) dependency.Manifold

Manifold returns a dependency manifold that runs the migration worker.

func New

func New(config Config) (worker.Worker, error)

New returns a Worker backed by config, or an error.

func NewWorker

func NewWorker(config Config) (worker.Worker, error)

Types

type Config

type Config struct {
	Facade    Facade
	MachineId string
	RootDir   string
}

Config defines the parameters of the hostkeyreporter worker.

func (Config) Validate

func (config Config) Validate() error

Validate returns an error if Config cannot drive a hostkeyreporter.

type Facade

type Facade interface {
	ReportKeys(machineId string, publicKeys []string) error
}

Facade exposes controller functionality to a Worker.

func NewFacade

func NewFacade(apiCaller base.APICaller) (Facade, error)

type ManifoldConfig

type ManifoldConfig struct {
	AgentName     string
	APICallerName string
	RootDir       string

	NewFacade func(base.APICaller) (Facade, error)
	NewWorker func(Config) (worker.Worker, error)
}

ManifoldConfig defines the names of the manifolds on which the hostkeyreporter worker depends.

Jump to

Keyboard shortcuts

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