Documentation ¶
Index ¶
- type FakeContainer
- func (c *FakeContainer) Cleanup()
- func (c *FakeContainer) GraceTime() time.Duration
- func (c *FakeContainer) Handle() string
- func (c *FakeContainer) ID() string
- func (c *FakeContainer) Properties() api.Properties
- func (c *FakeContainer) Snapshot(snapshot io.Writer) error
- func (c *FakeContainer) Start(mtu uint32) error
- type FakeContainerPool
- func (p *FakeContainerPool) Create(spec api.ContainerSpec) (linux_backend.Container, error)
- func (p *FakeContainerPool) Destroy(container linux_backend.Container) error
- func (p *FakeContainerPool) MaxContainers() int
- func (p *FakeContainerPool) Prune(keep map[string]bool) error
- func (p *FakeContainerPool) Restore(snapshot io.Reader) (linux_backend.Container, error)
- func (p *FakeContainerPool) Setup() error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeContainer ¶
type FakeContainer struct { *fakes.FakeContainer Spec api.ContainerSpec SnapshotError error SavedSnapshots []io.Writer StartError error Started bool Mtu uint32 CleanedUp bool // contains filtered or unexported fields }
func NewFakeContainer ¶
func NewFakeContainer(spec api.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) ID ¶
func (c *FakeContainer) ID() string
func (*FakeContainer) Properties ¶
func (c *FakeContainer) Properties() api.Properties
func (*FakeContainer) Start ¶
func (c *FakeContainer) Start(mtu uint32) 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 (p *FakeContainerPool) Create(spec api.ContainerSpec) (linux_backend.Container, error)
func (*FakeContainerPool) Destroy ¶
func (p *FakeContainerPool) Destroy(container linux_backend.Container) error
func (*FakeContainerPool) MaxContainers ¶
func (p *FakeContainerPool) MaxContainers() int
func (*FakeContainerPool) Restore ¶
func (p *FakeContainerPool) Restore(snapshot io.Reader) (linux_backend.Container, error)
func (*FakeContainerPool) Setup ¶
func (p *FakeContainerPool) Setup() error
Click to show internal directories.
Click to hide internal directories.