fake_container_pool

package
v0.0.0-...-9038be0 Latest Latest
Warning

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

Go to latest
Published: May 29, 2015 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

This file was generated by counterfeiter

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FakeContainer

type FakeContainer struct {
	*fakes.FakeContainer

	Spec garden.ContainerSpec

	SnapshotError  error
	SavedSnapshots []io.Writer

	StartError error
	Started    bool

	CleanedUp bool
	// contains filtered or unexported fields
}

func NewFakeContainer

func NewFakeContainer(spec garden.ContainerSpec) *FakeContainer

func (*FakeContainer) Cleanup

func (c *FakeContainer) Cleanup()

func (*FakeContainer) GraceTime

func (c *FakeContainer) GraceTime() time.Duration

func (*FakeContainer) Handle

func (c *FakeContainer) Handle() string

func (*FakeContainer) HasProperties

func (c *FakeContainer) HasProperties(ps garden.Properties) bool

func (*FakeContainer) ID

func (c *FakeContainer) ID() string

func (*FakeContainer) Snapshot

func (c *FakeContainer) Snapshot(snapshot io.Writer) error

func (*FakeContainer) Start

func (c *FakeContainer) Start() error

type FakeContainerPool

type FakeContainerPool struct {
	DidSetup bool

	MaxContainersValue int

	Pruned         bool
	PruneError     error
	KeptContainers map[string]bool

	CreateError  error
	RestoreError error
	DestroyError error

	ContainerSetup func(*FakeContainer)

	CreatedContainers   []linux_backend.Container
	DestroyedContainers []linux_backend.Container
	RestoredSnapshots   []io.Reader
}

func New

func New() *FakeContainerPool

func (*FakeContainerPool) Create

func (*FakeContainerPool) Destroy

func (p *FakeContainerPool) Destroy(container linux_backend.Container) error

func (*FakeContainerPool) MaxContainers

func (p *FakeContainerPool) MaxContainers() int

func (*FakeContainerPool) Prune

func (p *FakeContainerPool) Prune(keep map[string]bool) error

func (*FakeContainerPool) Restore

func (p *FakeContainerPool) Restore(snapshot io.Reader) (linux_backend.Container, error)

func (*FakeContainerPool) Setup

func (p *FakeContainerPool) Setup() error

type FakeFilterProvider

type FakeFilterProvider struct {
	ProvideFilterStub func(containerId string) network.Filter
	// contains filtered or unexported fields
}

func (*FakeFilterProvider) ProvideFilter

func (fake *FakeFilterProvider) ProvideFilter(containerId string) network.Filter

func (*FakeFilterProvider) ProvideFilterArgsForCall

func (fake *FakeFilterProvider) ProvideFilterArgsForCall(i int) string

func (*FakeFilterProvider) ProvideFilterCallCount

func (fake *FakeFilterProvider) ProvideFilterCallCount() int

func (*FakeFilterProvider) ProvideFilterReturns

func (fake *FakeFilterProvider) ProvideFilterReturns(result1 network.Filter)

Jump to

Keyboard shortcuts

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