// Used to signify that streams are multiplexed and therefore need a StdWriter to encode stdout/stderr messages accordingly.
// TODO @cpuguy83: This shouldn't be needed. It was only added so that http and websocket endpoints can use the same function, and the websocket function was not using a stdwriter prior to this change...
// HOWEVER, the websocket endpoint is using a single stream and SHOULD be encoded with stdout/stderr as is done for HTTP since it is still just a single stream.
// Since such a change is an API change unrelated to the current changeset we'll keep it as is here and change separately.
MuxStreamsbool
}
// LogMessage is datastructure that represents piece of output produced by some
// container. The Line member is a slice of an array whose contents can be
// changed after a log driver's Log() method returns.
// changes to this struct need to be reflect in the reset method in
// daemon/logger/logger.go
typeLogMessagestruct{
Line[]byte
Sourcestring
Timestamptime.Time
Attrs[]LogAttr
Partialbool
// Err is an error associated with a message. Completeness of a message
// with Err is not expected, tho it may be partially complete (fields may
// be missing, gibberish, or nil)
Errerror
}
// LogAttr is used to hold the extra attributes available in the log message.
typeLogAttrstruct{
Keystring
Valuestring
}
// LogSelector is a list of services and tasks that should be returned as part
// of a log stream. It is similar to swarmapi.LogSelector, with the difference
// that the names don't have to be resolved to IDs; this is mostly to avoid
// accidents later where a swarmapi LogSelector might have been incorrectly
// used verbatim (and to avoid the handler having to import swarmapi types)
typeLogSelectorstruct{
Services[]string
Tasks[]string
}
// ContainerStatsConfig holds information for configuring the runtime
// behavior of a backend.ContainerStats() call.
typeContainerStatsConfigstruct{
Streambool
OutStreamio.Writer
Versionstring
}
// ExecInspect holds information about a running process started
// with docker exec.
typeExecInspectstruct{
IDstring
Runningbool
ExitCode*int
ProcessConfig*ExecProcessConfig
OpenStdinbool
OpenStderrbool
OpenStdoutbool
CanRemovebool
ContainerIDstring
DetachKeys[]byte
Pidint
}
// ExecProcessConfig holds information about the exec process