Documentation ¶
Index ¶
- Constants
- Variables
- func NewBulkStarter(starters []Starter) *bulkStarter
- type ActualContainerMetrics
- type ActualContainerSpec
- type BulkStarter
- type Containerizer
- type DesiredContainerSpec
- type Gardener
- func (g *Gardener) BulkInfo(handles []string) (map[string]garden.ContainerInfoEntry, error)
- func (g *Gardener) BulkMetrics(handles []string) (map[string]garden.ContainerMetricsEntry, error)
- func (g *Gardener) Capacity() (garden.Capacity, error)
- func (g *Gardener) Containers(props garden.Properties) ([]garden.Container, error)
- func (g *Gardener) Create(spec garden.ContainerSpec) (ctr garden.Container, err error)
- func (g *Gardener) Destroy(handle string) error
- func (g *Gardener) GraceTime(container garden.Container) time.Duration
- func (g *Gardener) Lookup(handle string) (garden.Container, error)
- func (g *Gardener) Ping() error
- func (g *Gardener) Start() error
- func (g *Gardener) Stop()
- type Networker
- type NoopRestorer
- type NoopVolumeCreator
- func (NoopVolumeCreator) Create(lager.Logger, string, rootfs_provider.Spec) (string, []string, error)
- func (NoopVolumeCreator) Destroy(lager.Logger, string) error
- func (NoopVolumeCreator) GC(lager.Logger) error
- func (NoopVolumeCreator) Metrics(lager.Logger, string, bool) (garden.ContainerDiskStat, error)
- type PropertyManager
- type Restorer
- type Starter
- type SysInfoProvider
- type UidGenerator
- type UidGeneratorFunc
- type VolumeCreator
Constants ¶
View Source
const BridgeIPKey = "garden.network.host-ip"
View Source
const ContainerIPKey = "garden.network.container-ip"
View Source
const ExternalIPKey = "garden.network.external-ip"
View Source
const GraceTimeKey = "garden.grace-time"
View Source
const MappedPortsKey = "garden.network.mapped-ports"
View Source
const RawRootFSScheme = "raw"
Variables ¶
View Source
var ErrGraphDisabled = errors.New("volume graph is disabled")
Functions ¶
func NewBulkStarter ¶
func NewBulkStarter(starters []Starter) *bulkStarter
Types ¶
type ActualContainerMetrics ¶
type ActualContainerMetrics struct { CPU garden.ContainerCPUStat Memory garden.ContainerMemoryStat }
type ActualContainerSpec ¶
type ActualContainerSpec struct { // The PID of the container's init process Pid int // The path to the container's bundle directory BundlePath string // The path to the container's rootfs RootFSPath string // Whether the container is stopped Stopped bool // Process IDs (not PIDs) of processes in the container ProcessIDs []string // Events (e.g. OOM) which have occured in the container Events []string // Applied limits Limits garden.Limits // Whether the container is privileged Privileged bool }
type BulkStarter ¶
type BulkStarter interface {
StartAll() error
}
var NoopBulkStarter BulkStarter = NewBulkStarter([]Starter{})
type Containerizer ¶
type Containerizer interface { Create(log lager.Logger, spec DesiredContainerSpec) error Handles() ([]string, error) StreamIn(log lager.Logger, handle string, spec garden.StreamInSpec) error StreamOut(log lager.Logger, handle string, spec garden.StreamOutSpec) (io.ReadCloser, error) Run(log lager.Logger, handle string, spec garden.ProcessSpec, io garden.ProcessIO) (garden.Process, error) Attach(log lager.Logger, handle string, processGUID string, io garden.ProcessIO) (garden.Process, error) Stop(log lager.Logger, handle string, kill bool) error Destroy(log lager.Logger, handle string) error RemoveBundle(log lager.Logger, handle string) error Info(log lager.Logger, handle string) (ActualContainerSpec, error) Metrics(log lager.Logger, handle string) (ActualContainerMetrics, error) }
type DesiredContainerSpec ¶
type Gardener ¶
type Gardener struct { // SysInfoProvider returns total memory and total disk SysInfoProvider SysInfoProvider // Containerizer runs and manages linux containers Containerizer Containerizer // UidGenerator generates unique ids for containers UidGenerator UidGenerator // BulkStarter runs any needed Starters that do start-up tasks (e.g. setting up cgroups) BulkStarter BulkStarter // Networker creates a network for containers Networker Networker // VolumeCreator creates volumes for containers VolumeCreator VolumeCreator Logger lager.Logger // PropertyManager creates map of container properties PropertyManager PropertyManager // MaxContainers limits the advertised container capacity MaxContainers uint64 Restorer Restorer }
Gardener orchestrates other components to implement the Garden API
func (*Gardener) BulkMetrics ¶
func (*Gardener) Containers ¶
type Networker ¶
type Networker interface { Network(log lager.Logger, spec garden.ContainerSpec, pid int) error Capacity() uint64 Destroy(log lager.Logger, handle string) error NetIn(log lager.Logger, handle string, hostPort, containerPort uint32) (uint32, uint32, error) BulkNetOut(log lager.Logger, handle string, rules []garden.NetOutRule) error NetOut(log lager.Logger, handle string, rule garden.NetOutRule) error Restore(log lager.Logger, handle string) error }
type NoopRestorer ¶
type NoopRestorer struct{}
type NoopVolumeCreator ¶
type NoopVolumeCreator struct{}
func (NoopVolumeCreator) Create ¶
func (NoopVolumeCreator) Create(lager.Logger, string, rootfs_provider.Spec) (string, []string, error)
func (NoopVolumeCreator) Metrics ¶
func (NoopVolumeCreator) Metrics(lager.Logger, string, bool) (garden.ContainerDiskStat, error)
type PropertyManager ¶
type PropertyManager interface { All(handle string) (props garden.Properties, err error) Set(handle string, name string, value string) Remove(handle string, name string) error Get(handle string, name string) (string, bool) MatchesAll(handle string, props garden.Properties) bool DestroyKeySpace(string) error }
type Restorer ¶
func NewRestorer ¶
type SysInfoProvider ¶
type UidGenerator ¶
type UidGenerator interface {
Generate() string
}
type UidGeneratorFunc ¶
type UidGeneratorFunc func() string
func (UidGeneratorFunc) Generate ¶
func (fn UidGeneratorFunc) Generate() string
type VolumeCreator ¶
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
This file was generated by counterfeiter
|
This file was generated by counterfeiter |
Click to show internal directories.
Click to hide internal directories.