Documentation ¶
Index ¶
- Variables
- type Client
- type Container
- type ContainerSpec
- type ContainerType
- type ExponentialRetryPolicy
- type Identifier
- type MultipleContainersError
- type NoCompatibleWorkersError
- type Pool
- type ResourceTypeContainerSpec
- type RetryPolicy
- type RetryableConnection
- func (conn RetryableConnection) Attach(handle string, processID uint32, processIO garden.ProcessIO) (garden.Process, error)
- func (conn RetryableConnection) Capacity() (garden.Capacity, error)
- func (conn RetryableConnection) Create(spec garden.ContainerSpec) (string, error)
- func (conn RetryableConnection) CurrentBandwidthLimits(handle string) (garden.BandwidthLimits, error)
- func (conn RetryableConnection) CurrentCPULimits(handle string) (garden.CPULimits, error)
- func (conn RetryableConnection) CurrentDiskLimits(handle string) (garden.DiskLimits, error)
- func (conn RetryableConnection) CurrentMemoryLimits(handle string) (garden.MemoryLimits, error)
- func (conn RetryableConnection) Destroy(handle string) error
- func (conn RetryableConnection) Info(handle string) (garden.ContainerInfo, error)
- func (conn RetryableConnection) LimitBandwidth(handle string, limits garden.BandwidthLimits) (garden.BandwidthLimits, error)
- func (conn RetryableConnection) LimitCPU(handle string, limits garden.CPULimits) (garden.CPULimits, error)
- func (conn RetryableConnection) LimitDisk(handle string, limits garden.DiskLimits) (garden.DiskLimits, error)
- func (conn RetryableConnection) LimitMemory(handle string, limits garden.MemoryLimits) (garden.MemoryLimits, error)
- func (conn RetryableConnection) List(properties garden.Properties) ([]string, error)
- func (conn RetryableConnection) NetIn(handle string, hostPort, containerPort uint32) (uint32, uint32, error)
- func (conn RetryableConnection) NetOut(handle string, rule garden.NetOutRule) error
- func (conn RetryableConnection) Ping() error
- func (conn RetryableConnection) Property(handle string, name string) (string, error)
- func (conn RetryableConnection) RemoveProperty(handle string, name string) error
- func (conn RetryableConnection) Run(handle string, processSpec garden.ProcessSpec, processIO garden.ProcessIO) (garden.Process, error)
- func (conn RetryableConnection) SetProperty(handle string, name string, value string) error
- func (conn RetryableConnection) Stop(handle string, kill bool) error
- func (conn RetryableConnection) StreamIn(handle string, spec garden.StreamInSpec) error
- func (conn RetryableConnection) StreamOut(handle string, spec garden.StreamOutSpec) (io.ReadCloser, error)
- type Sleeper
- type TaskContainerSpec
- type Worker
- type WorkerDB
- type WorkerProvider
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrContainerNotFound = errors.New("container not found")
View Source
var ErrNoWorkers = errors.New("no workers")
View Source
var ErrUnsupportedResourceType = errors.New("unsupported resource type")
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { CreateContainer(Identifier, ContainerSpec) (Container, error) LookupContainer(Identifier) (Container, error) }
func NewPool ¶
func NewPool(provider WorkerProvider) Client
type ContainerSpec ¶
type ContainerSpec interface {
Description() string
}
type ContainerType ¶
type ContainerType string
const ( ContainerTypeCheck ContainerType = "check" ContainerTypeGet ContainerType = "get" ContainerTypePut ContainerType = "put" ContainerTypeTask ContainerType = "task" )
type ExponentialRetryPolicy ¶
type Identifier ¶
type MultipleContainersError ¶
type MultipleContainersError struct {
Handles []string
}
func (MultipleContainersError) Error ¶
func (err MultipleContainersError) Error() string
type NoCompatibleWorkersError ¶
type NoCompatibleWorkersError struct { Spec ContainerSpec Workers []Worker }
func (NoCompatibleWorkersError) Error ¶
func (err NoCompatibleWorkersError) Error() string
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
func (*Pool) CreateContainer ¶
func (pool *Pool) CreateContainer(id Identifier, spec ContainerSpec) (Container, error)
func (*Pool) LookupContainer ¶
func (pool *Pool) LookupContainer(id Identifier) (Container, error)
type ResourceTypeContainerSpec ¶
func (ResourceTypeContainerSpec) Description ¶
func (spec ResourceTypeContainerSpec) Description() string
type RetryableConnection ¶
type RetryableConnection struct { gconn.Connection Logger lager.Logger Sleeper Sleeper RetryPolicy RetryPolicy }
func (RetryableConnection) Capacity ¶
func (conn RetryableConnection) Capacity() (garden.Capacity, error)
func (RetryableConnection) Create ¶
func (conn RetryableConnection) Create(spec garden.ContainerSpec) (string, error)
func (RetryableConnection) CurrentBandwidthLimits ¶
func (conn RetryableConnection) CurrentBandwidthLimits(handle string) (garden.BandwidthLimits, error)
func (RetryableConnection) CurrentCPULimits ¶
func (conn RetryableConnection) CurrentCPULimits(handle string) (garden.CPULimits, error)
func (RetryableConnection) CurrentDiskLimits ¶
func (conn RetryableConnection) CurrentDiskLimits(handle string) (garden.DiskLimits, error)
func (RetryableConnection) CurrentMemoryLimits ¶
func (conn RetryableConnection) CurrentMemoryLimits(handle string) (garden.MemoryLimits, error)
func (RetryableConnection) Destroy ¶
func (conn RetryableConnection) Destroy(handle string) error
func (RetryableConnection) Info ¶
func (conn RetryableConnection) Info(handle string) (garden.ContainerInfo, error)
func (RetryableConnection) LimitBandwidth ¶
func (conn RetryableConnection) LimitBandwidth(handle string, limits garden.BandwidthLimits) (garden.BandwidthLimits, error)
func (RetryableConnection) LimitDisk ¶
func (conn RetryableConnection) LimitDisk(handle string, limits garden.DiskLimits) (garden.DiskLimits, error)
func (RetryableConnection) LimitMemory ¶
func (conn RetryableConnection) LimitMemory(handle string, limits garden.MemoryLimits) (garden.MemoryLimits, error)
func (RetryableConnection) List ¶
func (conn RetryableConnection) List(properties garden.Properties) ([]string, error)
func (RetryableConnection) NetOut ¶
func (conn RetryableConnection) NetOut(handle string, rule garden.NetOutRule) error
func (RetryableConnection) Ping ¶
func (conn RetryableConnection) Ping() error
func (RetryableConnection) Property ¶
func (conn RetryableConnection) Property(handle string, name string) (string, error)
func (RetryableConnection) RemoveProperty ¶
func (conn RetryableConnection) RemoveProperty(handle string, name string) error
func (RetryableConnection) Run ¶
func (conn RetryableConnection) Run(handle string, processSpec garden.ProcessSpec, processIO garden.ProcessIO) (garden.Process, error)
func (RetryableConnection) SetProperty ¶
func (conn RetryableConnection) SetProperty(handle string, name string, value string) error
func (RetryableConnection) Stop ¶
func (conn RetryableConnection) Stop(handle string, kill bool) error
func (RetryableConnection) StreamIn ¶
func (conn RetryableConnection) StreamIn(handle string, spec garden.StreamInSpec) error
func (RetryableConnection) StreamOut ¶
func (conn RetryableConnection) StreamOut(handle string, spec garden.StreamOutSpec) (io.ReadCloser, error)
type TaskContainerSpec ¶
func (TaskContainerSpec) Description ¶
func (spec TaskContainerSpec) Description() string
type Worker ¶
type Worker interface { Client ActiveContainers() int Satisfies(ContainerSpec) bool Description() string }
type WorkerDB ¶
type WorkerDB interface {
Workers() ([]db.WorkerInfo, error)
}
type WorkerProvider ¶
func NewDBWorkerProvider ¶
func NewDBWorkerProvider(db WorkerDB, logger lager.Logger) WorkerProvider
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter
|
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter |
Click to show internal directories.
Click to hide internal directories.