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

package mock

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

Index

Package Files

mock-kvm.go

type Action Uses

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

func (Action) String Uses

func (action Action) String() string

type ContainerFactory Uses

type ContainerFactory interface {
    kvm.ContainerFactory

    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) and is imported by 45 packages. Updated 2019-05-09. Refresh now. Tools for package owners.