Documentation
¶
Index ¶
Constants ¶
const ( // RFC3339NanoFixed is Docker's version of RFC339Nano that pads the // nanoseconds with zeros to ensure that the timestamps are aligned in the logs. RFC3339NanoFixed = "2006-01-02T15:04:05.000000000Z07:00" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Clock ¶
Clock defines an interface that wraps time.Now()
type Entry ¶
Entry describes a containerVM log entry
type Header ¶
Header describes the header of a containerVM log entry
type LogClock ¶
type LogClock struct{}
LogClock is an implementation of the Clock interface that returns time.Now() for use in the iolog package
type LogReader ¶
type LogReader struct { io.ReadCloser // contains filtered or unexported fields }
LogReader reads containerVM entries from a stream and decodes them into their original form
func NewLogReader ¶
func NewLogReader(r io.ReadCloser, ts bool) *LogReader
NewLogReader wraps an io.ReadCloser in a LogReader.
func (*LogReader) Read ¶
Read reads a 10 byte header and decodes it into the timestamp, stream and size of an entry. It uses the size to read the next set of bytes as the message, and then copies the message into the supplied buffer, saving what will not fit in the buffer for the next call to Read.
type LogWriter ¶
type LogWriter struct { Clock // contains filtered or unexported fields }
LogWriter tags log entries with a descriptive header and writes them to the underlying io.Writer
func NewLogWriter ¶
NewLogWriter wraps an io.WriteCloser in a LogWriter
func (*LogWriter) Close ¶
Close will flush the remaining bytes that have not yet been written
Source Files
¶
- constants.go
- log_reader.go
- log_writer.go