Documentation ¶
Index ¶
- func NewEventStore(props Properties) *events
- func NewStateStore(props Properties) *states
- type BundleGenerator
- type BundleLoader
- type BundleTemplate
- type BundlerRule
- type CgroupStarter
- type CgroupsFormatError
- type Containerizer
- func (c *Containerizer) Attach(log lager.Logger, handle string, processID string, io garden.ProcessIO) (garden.Process, error)
- func (c *Containerizer) Create(log lager.Logger, spec gardener.DesiredContainerSpec) error
- func (c *Containerizer) Destroy(log lager.Logger, handle string) error
- func (c *Containerizer) Handles() ([]string, error)
- func (c *Containerizer) Info(log lager.Logger, handle string) (gardener.ActualContainerSpec, error)
- func (c *Containerizer) Metrics(log lager.Logger, handle string) (gardener.ActualContainerMetrics, error)
- func (c *Containerizer) RemoveBundle(log lager.Logger, handle string) error
- func (c *Containerizer) Run(log lager.Logger, handle string, spec garden.ProcessSpec, io garden.ProcessIO) (garden.Process, error)
- func (c *Containerizer) Stop(log lager.Logger, handle string, kill bool) error
- func (c *Containerizer) StreamIn(log lager.Logger, handle string, spec garden.StreamInSpec) error
- func (c *Containerizer) StreamOut(log lager.Logger, handle string, spec garden.StreamOutSpec) (io.ReadCloser, error)
- type Depot
- type EventStore
- type NstarRunner
- type OCIRuntime
- type Properties
- type Starter
- type StateStore
- type Stopper
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewEventStore ¶
func NewEventStore(props Properties) *events
func NewStateStore ¶
func NewStateStore(props Properties) *states
Types ¶
type BundleGenerator ¶
type BundleGenerator interface {
Generate(spec gardener.DesiredContainerSpec) goci.Bndl
}
type BundleTemplate ¶
type BundleTemplate struct {
Rules []BundlerRule
}
func (BundleTemplate) Generate ¶
func (b BundleTemplate) Generate(spec gardener.DesiredContainerSpec) goci.Bndl
type BundlerRule ¶
type CgroupStarter ¶
type CgroupStarter struct { CgroupPath string CommandRunner command_runner.CommandRunner ProcCgroups io.ReadCloser ProcSelfCgroups io.ReadCloser Logger lager.Logger }
func (*CgroupStarter) Start ¶
func (s *CgroupStarter) Start() error
type CgroupsFormatError ¶
type CgroupsFormatError struct {
Content string
}
func (CgroupsFormatError) Error ¶
func (err CgroupsFormatError) Error() string
type Containerizer ¶
type Containerizer struct {
// contains filtered or unexported fields
}
Containerizer knows how to manage a depot of container bundles
func New ¶
func New(depot Depot, bundler BundleGenerator, runtime OCIRuntime, loader BundleLoader, nstarRunner NstarRunner, stopper Stopper, events EventStore, states StateStore) *Containerizer
func (*Containerizer) Create ¶
func (c *Containerizer) Create(log lager.Logger, spec gardener.DesiredContainerSpec) error
Create creates a bundle in the depot and starts its init process
func (*Containerizer) Destroy ¶
func (c *Containerizer) Destroy(log lager.Logger, handle string) error
Destroy deletes the container and the bundle directory
func (*Containerizer) Handles ¶
func (c *Containerizer) Handles() ([]string, error)
Handles returns a list of all container handles
func (*Containerizer) Info ¶
func (c *Containerizer) Info(log lager.Logger, handle string) (gardener.ActualContainerSpec, error)
func (*Containerizer) Metrics ¶
func (c *Containerizer) Metrics(log lager.Logger, handle string) (gardener.ActualContainerMetrics, error)
func (*Containerizer) RemoveBundle ¶
func (c *Containerizer) RemoveBundle(log lager.Logger, handle string) error
func (*Containerizer) Run ¶
func (c *Containerizer) Run(log lager.Logger, handle string, spec garden.ProcessSpec, io garden.ProcessIO) (garden.Process, error)
Run runs a process inside a running container
func (*Containerizer) Stop ¶
Stop stops all the processes other than the init process in the container
func (*Containerizer) StreamIn ¶
func (c *Containerizer) StreamIn(log lager.Logger, handle string, spec garden.StreamInSpec) error
StreamIn streams files in to the container
func (*Containerizer) StreamOut ¶
func (c *Containerizer) StreamOut(log lager.Logger, handle string, spec garden.StreamOutSpec) (io.ReadCloser, error)
StreamOut stream files from the container
type EventStore ¶
type NstarRunner ¶
type NstarRunner interface { StreamIn(log lager.Logger, pid int, path string, user string, tarStream io.Reader) error StreamOut(log lager.Logger, pid int, path string, user string) (io.ReadCloser, error) }
func NewNstarRunner ¶
func NewNstarRunner(nstarPath, tarPath string, runner command_runner.CommandRunner) NstarRunner
type OCIRuntime ¶
type OCIRuntime interface { Create(log lager.Logger, bundlePath, id string, io garden.ProcessIO) error Exec(log lager.Logger, id, bundlePath string, spec garden.ProcessSpec, io garden.ProcessIO) (garden.Process, error) Attach(log lager.Logger, id, bundlePath, processId string, io garden.ProcessIO) (garden.Process, error) Kill(log lager.Logger, bundlePath string) error Delete(log lager.Logger, bundlePath string) error State(log lager.Logger, id string) (runrunc.State, error) Stats(log lager.Logger, id string) (gardener.ActualContainerMetrics, error) WatchEvents(log lager.Logger, id string, eventsNotifier runrunc.EventsNotifier) error }
type Properties ¶
type Starter ¶
type Starter struct {
*CgroupStarter
}
func NewStarter ¶
func NewStarter(logger lager.Logger, procCgroupReader io.ReadCloser, procSelfCgroupReader io.ReadCloser, cgroupMountpoint string, runner command_runner.CommandRunner) *Starter
type StateStore ¶
Directories ¶
Path | Synopsis |
---|---|
dadoofakes
This file was generated by counterfeiter
|
This file was generated by counterfeiter |
depotfakes
This file was generated by counterfeiter
|
This file was generated by counterfeiter |
This file was generated by counterfeiter
|
This file was generated by counterfeiter |
runruncfakes
This file was generated by counterfeiter
|
This file was generated by counterfeiter |
stopperfakes
This file was generated by counterfeiter
|
This file was generated by counterfeiter |
Click to show internal directories.
Click to hide internal directories.