Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrSFlowSampleTooLarge = errors.New("sflow sample exceeds max_datagram_bytes")
Functions ¶
func GenerateProtobufDefinition ¶
func GenerateProtobufDefinition(cfg config.ProtobufConfig) (string, error)
Types ¶
type Encoder ¶
type IPFIXEncoder ¶
type IPFIXEncoder struct {
// contains filtered or unexported fields
}
func NewIPFIXEncoder ¶
func NewIPFIXEncoder(cfg config.EncoderConfig) *IPFIXEncoder
func (*IPFIXEncoder) Flush ¶
func (e *IPFIXEncoder) Flush() ([][]byte, error)
type JSONEncoder ¶
type JSONEncoder struct {
// contains filtered or unexported fields
}
func NewJSONEncoder ¶
func NewJSONEncoder(cfg config.EncoderConfig) *JSONEncoder
NewJSONEncoder creates the stateless JSON event encoder.
func (JSONEncoder) Encode ¶
func (e JSONEncoder) Encode(evt *event.Event) ([][]byte, error)
Encode serializes one event as a JSON payload in the configured output flavor.
func (JSONEncoder) Flush ¶
func (JSONEncoder) Flush() ([][]byte, error)
Flush is a no-op for JSON because it does not keep internal batching state.
type NFv5Encoder ¶
type NFv5Encoder struct {
// contains filtered or unexported fields
}
func NewNFv5Encoder ¶
func NewNFv5Encoder(cfg config.EncoderConfig) *NFv5Encoder
func (*NFv5Encoder) Encode ¶
func (e *NFv5Encoder) Encode(evt *event.Event) ([][]byte, error)
Encode turns one canonical event into one NetFlow v5 datagram.
func (*NFv5Encoder) Flush ¶
func (e *NFv5Encoder) Flush() ([][]byte, error)
Flush is a no-op because the NetFlow v5 encoder is stateless.
type NFv9Encoder ¶
type NFv9Encoder struct {
// contains filtered or unexported fields
}
func NewNFv9Encoder ¶
func NewNFv9Encoder(cfg config.EncoderConfig) *NFv9Encoder
func (*NFv9Encoder) Flush ¶
func (e *NFv9Encoder) Flush() ([][]byte, error)
type PcapEncoder ¶
type PcapEncoder struct {
// contains filtered or unexported fields
}
func NewPcapEncoder ¶
func NewPcapEncoder(cfg config.EncoderConfig) (*PcapEncoder, error)
func (*PcapEncoder) Flush ¶
func (e *PcapEncoder) Flush() ([][]byte, error)
type PcapNGEncoder ¶
type PcapNGEncoder struct {
// contains filtered or unexported fields
}
func NewPcapNGEncoder ¶
func NewPcapNGEncoder(cfg config.EncoderConfig) (*PcapNGEncoder, error)
func (*PcapNGEncoder) Flush ¶
func (e *PcapNGEncoder) Flush() ([][]byte, error)
type ProtobufEncoder ¶
type ProtobufEncoder struct {
// contains filtered or unexported fields
}
func NewProtobufEncoder ¶
func NewProtobufEncoder(cfg config.EncoderConfig) (*ProtobufEncoder, error)
func (*ProtobufEncoder) Encode ¶
func (e *ProtobufEncoder) Encode(evt *event.Event) ([][]byte, error)
func (*ProtobufEncoder) Flush ¶
func (e *ProtobufEncoder) Flush() ([][]byte, error)
type SFlowEncoder ¶
type SFlowEncoder struct {
// contains filtered or unexported fields
}
func NewSFlowEncoder ¶
func NewSFlowEncoder(cfg config.EncoderConfig) *SFlowEncoder
NewSFlowEncoder builds one encoder instance per runtime worker. Each instance keeps its own batch buffer and sequence counters.
func (*SFlowEncoder) Encode ¶
func (e *SFlowEncoder) Encode(evt *event.Event) ([][]byte, error)
Encode appends an event to the encoder-local batch or encodes it immediately.
func (*SFlowEncoder) Flush ¶
func (e *SFlowEncoder) Flush() ([][]byte, error)
Flush emits all buffered events, splitting them into multiple sFlow datagrams if needed.
Click to show internal directories.
Click to hide internal directories.