go:generate counterfeiter . Container
| 8 | //go:generate counterfeiter . Container |
| 9 | |
| 10 | type Container interface { |
| 11 | Handle() string |
| 12 | |
| 13 | // Stop stops a container. |
| 14 | // |
| 15 | // If kill is false, garden stops a container by sending the processes running inside it the SIGTERM signal. |
| 16 | // It then waits for the processes to terminate before returning a response. |
| 17 | // If one or more processes do not terminate within 10 seconds, |
| 18 | // garden sends these processes the SIGKILL signal, killing them ungracefully. |
| 19 | // |
| 20 | // If kill is true, garden stops a container by sending the processing running inside it a SIGKILL signal. |
| 21 | // |
| 22 | // It is possible to copy files in to and out of a stopped container. |
| 23 | // It is only when a container is destroyed that its filesystem is cleaned up. |
| 24 | // |
| 25 | // Errors: |
| 26 | // * None. |
| 27 | Stop(kill bool) error |
| 28 | |
| 29 | // Returns information about a container. |
| 30 | Info() (ContainerInfo, error) |
| 31 | |
| 32 | // StreamIn streams data into a file in a container. |
| 33 | // |
| 34 | // Errors: |
| 35 | // * TODO. |
| 36 | StreamIn(spec StreamInSpec) error |
| 37 | |
| 38 | // StreamOut streams a file out of a container. |
| 39 | // |
| 40 | // Errors: |
| 41 | // * TODO. |
| 42 | StreamOut(spec StreamOutSpec) (io.ReadCloser, error) |
| 43 | |
| 44 | // Returns the current bandwidth limits set for the container. |
| 45 | CurrentBandwidthLimits() (BandwidthLimits, error) |
| 46 | |
| 47 | // Returns the current CPU limts set for the container. |
| 48 | CurrentCPULimits() (CPULimits, error) |
| 49 | |
| 50 | // Returns the current disk limts set for the container. |
| 51 | CurrentDiskLimits() (DiskLimits, error) |
| 52 | |
| 53 | // Returns the current memory limts set for the container. |
| 54 | CurrentMemoryLimits() (MemoryLimits, error) |
| 55 | |
| 56 | // Map a port on the host to a port in the container so that traffic to the |
| 57 | // host port is forwarded to the container port. This is deprecated in |
| 58 | // favour of passing NetIn configuration in the ContainerSpec at creation |
| 59 | // time. |
| 60 | // |
| 61 | // If a host port is not given, a port will be acquired from the server's port |
| 62 | // pool. |
| 63 | // |
| 64 | // If a container port is not given, the port will be the same as the |
| 65 | // host port. |
| 66 | // |
| 67 | // The resulting host and container ports are returned in that order. |
no outgoing calls
no test coverage detected