juju: github.com/wallyworld/juju/container/kvm/mock Index | Files

package mock

import "github.com/wallyworld/juju/container/kvm/mock"


Package Files


type Action Uses

type Action int
const (
    // A container has been started.
    Started Action = iota
    // A container has been stopped.

func (Action) String Uses

func (action Action) String() string

type ContainerFactory Uses

type ContainerFactory interface {

    AddListener(chan<- Event)
    RemoveListener(chan<- Event)
    HasListener(chan<- Event) bool

func MockFactory Uses

func MockFactory() ContainerFactory

type Event Uses

type Event struct {
    Action     Action
    InstanceId string

type MockContainer Uses

type MockContainer struct {
    StartParams kvm.StartParams
    // contains filtered or unexported fields

func (*MockContainer) EnsureCachedImage Uses

func (mock *MockContainer) EnsureCachedImage(params kvm.StartParams) error

EnsureCachedImage is the first supply of start-params to the container. We set it here for subsequent test assertions. Start is called by the manager immediately after, with the same argument.

func (*MockContainer) IsRunning Uses

func (mock *MockContainer) IsRunning() bool

func (*MockContainer) Name Uses

func (mock *MockContainer) Name() string

Name returns the name of the container.

func (*MockContainer) Start Uses

func (mock *MockContainer) Start(params kvm.StartParams) error

func (*MockContainer) Stop Uses

func (mock *MockContainer) Stop() error

Stop terminates the running container.

func (*MockContainer) String Uses

func (mock *MockContainer) String() string

String returns information about the container.

Package mock imports 3 packages (graph). Updated 2019-04-23. Refresh now. Tools for package owners.