Documentation ¶
Index ¶
- type UndefinedPropertyError
- type WindowsContainer
- func (container *WindowsContainer) Attach(processID string, io garden.ProcessIO) (garden.Process, error)
- func (container *WindowsContainer) CurrentBandwidthLimits() (garden.BandwidthLimits, error)
- func (container *WindowsContainer) CurrentCPULimits() (garden.CPULimits, error)
- func (container *WindowsContainer) CurrentDiskLimits() (garden.DiskLimits, error)
- func (container *WindowsContainer) CurrentMemoryLimits() (garden.MemoryLimits, error)
- func (container *WindowsContainer) Destroy() error
- func (container *WindowsContainer) Handle() string
- func (container *WindowsContainer) Info() (garden.ContainerInfo, error)
- func (container *WindowsContainer) Metrics() (garden.Metrics, error)
- func (container *WindowsContainer) NetIn(hostPort, containerPort uint32) (uint32, uint32, error)
- func (container *WindowsContainer) NetOut(netOutRule garden.NetOutRule) error
- func (container *WindowsContainer) Properties() (garden.Properties, error)
- func (container *WindowsContainer) Property(name string) (string, error)
- func (container *WindowsContainer) RemoveProperty(name string) error
- func (container *WindowsContainer) Run(spec garden.ProcessSpec, pio garden.ProcessIO) (garden.Process, error)
- func (container *WindowsContainer) SetGraceTime(graceTime time.Duration) error
- func (container *WindowsContainer) SetProperty(name string, value string) error
- func (container *WindowsContainer) Stop(kill bool) error
- func (container *WindowsContainer) StreamIn(spec garden.StreamInSpec) error
- func (container *WindowsContainer) StreamOut(spec garden.StreamOutSpec) (io.ReadCloser, error)
- type WindowsContainerSpec
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UndefinedPropertyError ¶
type UndefinedPropertyError struct {
Key string
}
func (UndefinedPropertyError) Error ¶
func (err UndefinedPropertyError) Error() string
type WindowsContainer ¶
type WindowsContainer struct { WindowsContainerSpec // contains filtered or unexported fields }
func NewContainer ¶
func NewContainer(id, handle string, containerSpec garden.ContainerSpec, logger lager.Logger, hostIP string, driverInfo hcsshim.DriverInfo, baseImagePath string) (*WindowsContainer, error)
func (*WindowsContainer) Attach ¶
func (container *WindowsContainer) Attach(processID string, io garden.ProcessIO) (garden.Process, error)
Attach starts streaming the output back to the client from a specified process.
Errors: * processID does not refer to a running process.
func (*WindowsContainer) CurrentBandwidthLimits ¶
func (container *WindowsContainer) CurrentBandwidthLimits() (garden.BandwidthLimits, error)
func (*WindowsContainer) CurrentCPULimits ¶
func (container *WindowsContainer) CurrentCPULimits() (garden.CPULimits, error)
func (*WindowsContainer) CurrentDiskLimits ¶
func (container *WindowsContainer) CurrentDiskLimits() (garden.DiskLimits, error)
func (*WindowsContainer) CurrentMemoryLimits ¶
func (container *WindowsContainer) CurrentMemoryLimits() (garden.MemoryLimits, error)
func (*WindowsContainer) Destroy ¶
func (container *WindowsContainer) Destroy() error
func (*WindowsContainer) Handle ¶
func (container *WindowsContainer) Handle() string
func (*WindowsContainer) Info ¶
func (container *WindowsContainer) Info() (garden.ContainerInfo, error)
Returns information about a container.
func (*WindowsContainer) Metrics ¶
func (container *WindowsContainer) Metrics() (garden.Metrics, error)
Metrics returns the current set of metrics for a container
func (*WindowsContainer) NetIn ¶
func (container *WindowsContainer) NetIn(hostPort, containerPort uint32) (uint32, uint32, error)
Map a port on the host to a port in the container so that traffic to the host port is forwarded to the container port.
If a host port is not given, a port will be acquired from the server's port pool.
If a container port is not given, the port will be the same as the container port.
The two resulting ports are returned in the response.
Errors: * When no port can be acquired from the server's port pool.
func (*WindowsContainer) NetOut ¶
func (container *WindowsContainer) NetOut(netOutRule garden.NetOutRule) error
Whitelist outbound network traffic.
If the configuration directive deny_networks is not used, all networks are already whitelisted and this command is effectively a no-op.
Later NetOut calls take precedence over earlier calls, which is significant only in relation to logging.
Errors: * An error is returned if the NetOut call fails.
func (*WindowsContainer) Properties ¶
func (container *WindowsContainer) Properties() (garden.Properties, error)
Properties returns the current set of properties
func (*WindowsContainer) Property ¶
func (container *WindowsContainer) Property(name string) (string, error)
Property returns the value of the property with the specified name.
Errors: * When the property does not exist on the container.
func (*WindowsContainer) RemoveProperty ¶
func (container *WindowsContainer) RemoveProperty(name string) error
Remove a property with the specified name from a container.
Errors: * None.
func (*WindowsContainer) Run ¶
func (container *WindowsContainer) Run(spec garden.ProcessSpec, pio garden.ProcessIO) (garden.Process, error)
Run a script inside a container.
The root user will be mapped to a non-root UID in the host unless the container (not this process) was created with 'privileged' true.
Errors: * TODO.
func (*WindowsContainer) SetGraceTime ¶
func (container *WindowsContainer) SetGraceTime(graceTime time.Duration) error
func (*WindowsContainer) SetProperty ¶
func (container *WindowsContainer) SetProperty(name string, value string) error
Set a named property on a container to a specified value.
Errors: * None.
func (*WindowsContainer) Stop ¶
func (container *WindowsContainer) Stop(kill bool) error
Stop stops a container.
If kill is false, garden stops a container by sending the processes running inside it the SIGTERM signal. It then waits for the processes to terminate before returning a response. If one or more processes do not terminate within 10 seconds, garden sends these processes the SIGKILL signal, killing them ungracefully.
If kill is true, garden stops a container by sending the processing running inside it a SIGKILL signal.
Once a container is stopped, garden does not allow spawning new processes inside the container. It is possible to copy files in to and out of a stopped container. It is only when a container is destroyed that its filesystem is cleaned up.
Errors: * None.
func (*WindowsContainer) StreamIn ¶
func (container *WindowsContainer) StreamIn(spec garden.StreamInSpec) error
StreamIn streams data into a file in a container.
Errors: * TODO.
func (*WindowsContainer) StreamOut ¶
func (container *WindowsContainer) StreamOut(spec garden.StreamOutSpec) (io.ReadCloser, error)
StreamOut streams a file out of a container.
Errors: * TODO.
type WindowsContainerSpec ¶
type WindowsContainerSpec struct {
garden.ContainerSpec
}