Documentation ¶
Index ¶
- func DecodingError(err error) error
- func ErrorUnknownFormat(format string) error
- func InvalidTopicError(topic string) error
- func TopicNameIsValid(name string) bool
- type ConcreteParser
- type Environment
- func (e *Environment) AddParser(name string, parserFunc string) error
- func (e *Environment) FilterMessage(m *model.SyslogMessage) (filterResult FilterResult, err error)
- func (e *Environment) GetParser(name string) (func(m []byte) ([]*model.SyslogMessage, error), error)
- func (e *Environment) PartitionKey(m *model.SyslogMessage) (partitionKey string, err error)
- func (e *Environment) PartitionNumber(m *model.SyslogMessage) (partitionNumber int32, err error)
- func (e *Environment) Topic(m *model.SyslogMessage) (topic string, err error)
- type FilterEnvironment
- type FilterResult
- type ParsersEnvironment
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodingError ¶
func ErrorUnknownFormat ¶
func InvalidTopicError ¶
func TopicNameIsValid ¶
Types ¶
type ConcreteParser ¶
type ConcreteParser struct {
// contains filtered or unexported fields
}
func (*ConcreteParser) Parse ¶
func (p *ConcreteParser) Parse(rawMessage []byte) ([]*model.SyslogMessage, error)
type Environment ¶
type Environment struct {
// contains filtered or unexported fields
}
func NewFilterEnvironment ¶
func NewFilterEnvironment(filterFunc, topicFunc, topicTmpl, partitionKeyFunc, partitionKeyTmpl, partitionNumberFunc string, logger log15.Logger) *Environment
func NewParsersEnvironment ¶
func NewParsersEnvironment(logger log15.Logger) *Environment
func (*Environment) AddParser ¶
func (e *Environment) AddParser(name string, parserFunc string) error
func (*Environment) FilterMessage ¶
func (e *Environment) FilterMessage(m *model.SyslogMessage) (filterResult FilterResult, err error)
func (*Environment) GetParser ¶
func (e *Environment) GetParser(name string) (func(m []byte) ([]*model.SyslogMessage, error), error)
func (*Environment) PartitionKey ¶
func (e *Environment) PartitionKey(m *model.SyslogMessage) (partitionKey string, err error)
func (*Environment) PartitionNumber ¶
func (e *Environment) PartitionNumber(m *model.SyslogMessage) (partitionNumber int32, err error)
func (*Environment) Topic ¶
func (e *Environment) Topic(m *model.SyslogMessage) (topic string, err error)
type FilterEnvironment ¶
type FilterEnvironment interface { FilterMessage(m *model.SyslogMessage) (result *model.SyslogMessage, filterResult FilterResult, err error) PartitionKey(m model.SyslogMessage) (partitionKey string, errs []error) PartitionNumber(m model.SyslogMessage) (partitionNumber int32, errs []error) Topic(m *model.SyslogMessage) (topic string, errs []error) }
type FilterResult ¶
type FilterResult int64
const ( PASS FilterResult = 0 DROPPED FilterResult = 1 REJECTED FilterResult = 2 FILTER_ERROR FilterResult = 3 )
Click to show internal directories.
Click to hide internal directories.