mock

package
v0.0.0-...-2608902 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2016 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PatchCloneTransientErrorInjectionChannel

func PatchCloneTransientErrorInjectionChannel(c chan error) func()

PatchCloneTransientErrorInjectionChannel sets the cloneTransientInjectionError channel which can be used to inject errors into the Clone function for testing purposes.

func PatchCreateTransientErrorInjectionChannel

func PatchCreateTransientErrorInjectionChannel(c chan error) func()

PatchCreateTransientErrorInjectionChannel sets the createTransientInjectionError channel which can be used to inject errors into the Create function for testing purposes.

func PatchStartTransientErrorInjectionChannel

func PatchStartTransientErrorInjectionChannel(c chan error) func()

PatchStartTransientErrorInjectionChannel sets the startTransientInjectionError channel which can be used to inject errors into the Start function for testing purposes.

Types

type Action

type Action int
const (
	// A container has been started.
	Started Action = iota
	// A container has been stopped.
	Stopped
	// A container has been created.
	Created
	// A container has been destroyed.
	Destroyed
	// A container has been cloned.
	Cloned
)

func (Action) String

func (action Action) String() string

type ContainerFactory

type ContainerFactory interface {
	golxc.ContainerFactory

	AddListener(chan<- Event)
	RemoveListener(chan<- Event)
}

func MockFactory

func MockFactory(containerDir string) ContainerFactory

type Event

type Event struct {
	Action       Action
	InstanceId   string
	Args         []string
	TemplateArgs []string
	EnvArgs      []string
}

Jump to

Keyboard shortcuts

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