mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
9b782d3af3
Signed-off-by: wlan0 <sidharthamn@gmail.com>
29 lines
595 B
Go
29 lines
595 B
Go
package logger
|
|
|
|
import (
|
|
"errors"
|
|
"io"
|
|
"time"
|
|
)
|
|
|
|
var ReadLogsNotSupported = errors.New("configured logging reader does not support reading")
|
|
|
|
// Message is datastructure that represents record from some container
|
|
type Message struct {
|
|
ContainerID string
|
|
Line []byte
|
|
Source string
|
|
Timestamp time.Time
|
|
}
|
|
|
|
// Logger is interface for docker logging drivers
|
|
type Logger interface {
|
|
Log(*Message) error
|
|
Name() string
|
|
Close() error
|
|
}
|
|
|
|
//Reader is an interface for docker logging drivers that support reading
|
|
type Reader interface {
|
|
ReadLog(args ...string) (io.Reader, error)
|
|
}
|