Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Entry ¶
type Entry struct {
Log string `json:"log,omitempty"` // line, including "\r\n"
Stream string `json:"stream,omitempty"` // "stdout" or "stderr"
Time time.Time `json:"time"` // e.g. "2020-12-11T20:29:41.939902251Z"
}
Entry is compatible with Docker "json-file" logs
type SyncEncoder ¶ added in v2.3.4
type SyncEncoder struct {
// contains filtered or unexported fields
}
SyncEncoder writes individual json-file log entries to a writer. Its Encode method is safe for concurrent use, so it can be shared between the goroutines reading a container's stdout and stderr.
func NewSyncEncoder ¶ added in v2.3.4
func NewSyncEncoder(w io.Writer) *SyncEncoder
NewSyncEncoder returns a SyncEncoder that writes to w.
func (*SyncEncoder) Encode ¶ added in v2.3.4
func (s *SyncEncoder) Encode(stream, line string) error
Encode writes a single log entry for the given stream.
Click to show internal directories.
Click to hide internal directories.