Documentation ¶
Overview ¶
Package logdriver is a generated protocol buffer package.
It is generated from these files:
entry.proto
It has these top-level messages:
LogEntry
Index ¶
- Variables
- type LogEntry
- func (*LogEntry) Descriptor() ([]byte, []int)
- func (m *LogEntry) GetLine() []byte
- func (m *LogEntry) GetPartial() bool
- func (m *LogEntry) GetSource() string
- func (m *LogEntry) GetTimeNano() int64
- func (m *LogEntry) Marshal() (dAtA []byte, err error)
- func (m *LogEntry) MarshalTo(dAtA []byte) (int, error)
- func (*LogEntry) ProtoMessage()
- func (m *LogEntry) Reset()
- func (m *LogEntry) Size() (n int)
- func (m *LogEntry) String() string
- func (m *LogEntry) Unmarshal(dAtA []byte) error
- type LogEntryDecoder
- type LogEntryEncoder
Constants ¶
This section is empty.
Variables ¶
var ( ErrInvalidLengthEntry = fmt.Errorf("proto: negative length found during unmarshaling") ErrIntOverflowEntry = fmt.Errorf("proto: integer overflow") )
Functions ¶
This section is empty.
Types ¶
type LogEntry ¶
type LogEntry struct { Source string `protobuf:"bytes,1,opt,name=source,proto3" json:"source,omitempty"` TimeNano int64 `protobuf:"varint,2,opt,name=time_nano,json=timeNano,proto3" json:"time_nano,omitempty"` Line []byte `protobuf:"bytes,3,opt,name=line,proto3" json:"line,omitempty"` Partial bool `protobuf:"varint,4,opt,name=partial,proto3" json:"partial,omitempty"` }
func (*LogEntry) Descriptor ¶
func (*LogEntry) GetPartial ¶
func (*LogEntry) GetTimeNano ¶
func (*LogEntry) ProtoMessage ¶
func (*LogEntry) ProtoMessage()
type LogEntryDecoder ¶
LogEntryDecoder decodes log entries from a stream It is expected that the wire format is as defined by LogEntryEncoder.
func NewLogEntryDecoder ¶
func NewLogEntryDecoder(r io.Reader) LogEntryDecoder
NewLogEntryDecoder creates a new stream decoder for log entries
type LogEntryEncoder ¶
LogEntryEncoder encodes a LogEntry to a protobuf stream The stream should look like:
[uint32 binary encoded message size][protobuf message]
To decode an entry, read the first 4 bytes to get the size of the entry, then read `size` bytes from the stream.
func NewLogEntryEncoder ¶
func NewLogEntryEncoder(w io.Writer) LogEntryEncoder
NewLogEntryEncoder creates a protobuf stream encoder for log entries. This is used to write out log entries to a stream.