Add basic logging to file support
This currently logs to a json file with the stream type. This is slow and hard on the cpu and memory so we need to swich this over to something like protobufs for the binary logs but this is just a start. Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
8469b6d6a4
commit
e5545a1461
12 changed files with 278 additions and 58 deletions
|
@ -7,18 +7,20 @@ import (
|
|||
)
|
||||
|
||||
var (
|
||||
ErrNotChildProcess = errors.New("containerd: not a child process for container")
|
||||
ErrInvalidContainerType = errors.New("containerd: invalid container type for runtime")
|
||||
ErrCheckpointNotExists = errors.New("containerd: checkpoint does not exist for container")
|
||||
ErrCheckpointExists = errors.New("containerd: checkpoint already exists")
|
||||
ErrContainerExited = errors.New("containerd: container has exited")
|
||||
ErrNotChildProcess = errors.New("containerd: not a child process for container")
|
||||
ErrInvalidContainerType = errors.New("containerd: invalid container type for runtime")
|
||||
ErrCheckpointNotExists = errors.New("containerd: checkpoint does not exist for container")
|
||||
ErrCheckpointExists = errors.New("containerd: checkpoint already exists")
|
||||
ErrContainerExited = errors.New("containerd: container has exited")
|
||||
ErrTerminalsNotSupported = errors.New("containerd: terminals are not supported for runtime")
|
||||
)
|
||||
|
||||
// Runtime handles containers, containers handle their own actions
|
||||
type Runtime interface {
|
||||
// Create creates a new container initialized but without it starting it
|
||||
Create(id, bundlePath string, stdio *Stdio) (Container, error)
|
||||
// StartProcess adds a new process to the container
|
||||
StartProcess(Container, specs.Process, *Stdio) (Process, error)
|
||||
// Type of the runtime
|
||||
Type() string
|
||||
// Create creates a new container initialized but without it starting it
|
||||
Create(id, bundlePath string) (Container, *IO, error)
|
||||
// StartProcess adds a new process to the container
|
||||
StartProcess(Container, specs.Process) (Process, *IO, error)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue