Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewFactory ¶
NewFactory return a new receiver.Factory for fluentd forwarder.
Types ¶
type AckResponse ¶
type AckResponse struct {
Ack string `msg:"ack"`
}
type Collector ¶
type Collector struct {
// contains filtered or unexported fields
}
Collector acts as an aggregator of LogRecords so that we don't have to generate as many plog.Logs instances...we can pre-batch the LogRecord instances from several Forward events into one to hopefully reduce allocations and GC overhead.
type Config ¶
type Config struct { // The address to listen on for incoming Fluent Forward events. Should be // of the form `<ip addr>:<port>` (TCP) or `unix://<socket_path>` (Unix // domain socket). ListenAddress string `mapstructure:"endpoint"` }
Config defines configuration for the fluentforward receiver.
type EventMode ¶
type EventMode int
Values for enum EventMode.
func DetermineNextEventMode ¶
DetermineNextEventMode inspects the next bit of data from the given peeker reader to determine which type of event mode it is. According to the forward protocol spec: "Server MUST detect the carrier mode by inspecting the second element of the array." It is assumed that peeker is aligned at the start of a new event, otherwise the result is undefined and will probably error.
type ForwardEventLogRecords ¶
type ForwardEventLogRecords struct { plog.LogRecordSlice OptionsMap }
func (*ForwardEventLogRecords) DecodeMsg ¶
func (fe *ForwardEventLogRecords) DecodeMsg(dc *msgp.Reader) error
func (*ForwardEventLogRecords) LogRecords ¶
func (fe *ForwardEventLogRecords) LogRecords() plog.LogRecordSlice
type MessageEventLogRecord ¶
type MessageEventLogRecord struct { plog.LogRecordSlice OptionsMap }
func (*MessageEventLogRecord) DecodeMsg ¶
func (melr *MessageEventLogRecord) DecodeMsg(dc *msgp.Reader) error
func (*MessageEventLogRecord) LogRecords ¶
func (melr *MessageEventLogRecord) LogRecords() plog.LogRecordSlice
type OptionsMap ¶
type OptionsMap map[string]interface{}
func (OptionsMap) Chunk ¶
func (om OptionsMap) Chunk() string
Chunk returns the `chunk` option or blank string if it was not set.
func (OptionsMap) Compressed ¶
func (om OptionsMap) Compressed() string
type PackedForwardEventLogRecords ¶
type PackedForwardEventLogRecords struct { plog.LogRecordSlice OptionsMap }
func (*PackedForwardEventLogRecords) DecodeMsg ¶
func (pfe *PackedForwardEventLogRecords) DecodeMsg(dc *msgp.Reader) error
DecodeMsg implements msgp.Decodable. This was originally code generated but then manually copied here in order to handle the optional Options field.
func (*PackedForwardEventLogRecords) LogRecords ¶
func (pfe *PackedForwardEventLogRecords) LogRecords() plog.LogRecordSlice