adapter

package
v0.0.0-...-2af5034 Latest Latest
Warning

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

Go to latest
Published: May 11, 2016 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatUUID

func FormatUUID(uuid string) string

func Names

func Names() []string

Names returns the names of all registered Adapters.

func Register

func Register(name string, ctr func() Adapter) error

Types

type Adapter

type Adapter interface {
	// Init should be called before any other methods, and no more than once.
	Init(*client.Config) error
	// Prepare must be called no more than once, and must return successfully
	// before any method other than Init is called. Any returned metrics
	// will be reported via the active Reporter
	Prepare(*client.Log) (client.Metrics, error)
	Run(*client.Command, *client.Log) (*client.CommandResult, error)
	Shutdown(*client.Log) (client.Metrics, error)
	CaptureSnapshot(string, *client.Log) error
	GetRootFs() string
	CollectArtifacts([]string, *client.Log) ([]string, error)
	// Get absolute path to directory in which artifacts are searched
	GetArtifactRoot() string
}

func Create

func Create(name string) (Adapter, error)

type Registry

type Registry map[string]func() Adapter

Jump to

Keyboard shortcuts

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