emulation

package
v0.0.0-...-c0b5b33 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2021 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const ResourceType = "emulation"

ResourceType encapuslates our standard resource type, for all storage agents.

Variables

View Source
var MonitorDir = filepath.Join(spin.ConfigDir(), "monitors")

MonitorDir is the directory where the qemu control monitors are kept

Functions

func Dispatcher

func Dispatcher(dc DispatcherConfig) dispatcher.Table

Dispatcher customizes a dispatcher for the purposes of making a emulation dispatcher with a pre-defined emulation-compatible API. See DispatcherConfig for more information.

func NewAgent

func NewAgent(ac AgentConfig) (*agent.Agent, error)

NewAgent creates an agent; the configuration is validated and errors are returned if they occur.

Types

type AgentConfig

type AgentConfig struct {
	SystemDir    string
	MonitorDir   string
	ClientConfig brokerclient.Config
	Supervisor   supervisor.Interface
}

AgentConfig is the configuration struct for the constructor.

func (*AgentConfig) Validate

func (ac *AgentConfig) Validate() error

Validate the configuration. Yields error on any, also sets default values if required.

type DispatcherConfig

type DispatcherConfig struct {
	WriteConfig  dispatcher.Func
	RemoveConfig dispatcher.Func
	Start        dispatcher.Func
	Stop         dispatcher.Func
	Shutdown     dispatcher.Func
}

DispatcherConfig configures the emulation Dispatcher() call. It is important for those that edit this struct, that the call must be edited too, for uniformity.

Jump to

Keyboard shortcuts

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