acceptorFilters

package
v1.13.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 27, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AcceptorFilterItf

type AcceptorFilterItf interface {
	SetUpstream(chan *libs.FluentMsg)
	SetMsgPool(*sync.Pool)

	Filter(*libs.FluentMsg) *libs.FluentMsg
	DiscardMsg(*libs.FluentMsg)
}

type AcceptorPipeline

type AcceptorPipeline struct {
	*AcceptorPipelineCfg
	// contains filtered or unexported fields
}

func NewAcceptorPipeline

func NewAcceptorPipeline(ctx context.Context, cfg *AcceptorPipelineCfg, filters ...AcceptorFilterItf) (a *AcceptorPipeline, err error)

func (*AcceptorPipeline) DiscardMsg

func (f *AcceptorPipeline) DiscardMsg(msg *libs.FluentMsg)

func (*AcceptorPipeline) Wrap

func (f *AcceptorPipeline) Wrap(ctx context.Context, asyncInChan, syncInChan chan *libs.FluentMsg) (outChan, skipDumpChan chan *libs.FluentMsg)

type AcceptorPipelineCfg

type AcceptorPipelineCfg struct {
	MsgPool                             *sync.Pool
	OutChanSize, ReEnterChanSize, NFork int
	IsThrottle                          bool
	ThrottleNPerSec, ThrottleMax        int
}

type BaseFilter

type BaseFilter struct {
	// contains filtered or unexported fields
}

func (*BaseFilter) DiscardMsg

func (f *BaseFilter) DiscardMsg(msg *libs.FluentMsg)

func (*BaseFilter) SetMsgPool

func (f *BaseFilter) SetMsgPool(msgPool *sync.Pool)

func (*BaseFilter) SetUpstream

func (f *BaseFilter) SetUpstream(upChan chan *libs.FluentMsg)

type DefaultFilter

type DefaultFilter struct {
	*BaseFilter
	*DefaultFilterCfg
	// contains filtered or unexported fields
}

func NewDefaultFilter

func NewDefaultFilter(cfg *DefaultFilterCfg) *DefaultFilter

func (*DefaultFilter) Filter

func (f *DefaultFilter) Filter(msg *libs.FluentMsg) *libs.FluentMsg

func (*DefaultFilter) GetName

func (f *DefaultFilter) GetName() string

func (*DefaultFilter) IsTagInConfigs

func (f *DefaultFilter) IsTagInConfigs(tag string) (ok bool)

type DefaultFilterCfg

type DefaultFilterCfg struct {
	RemoveEmptyTag, RemoveUnsupportTag bool
	SupportedTags                      []string
	Name, Env                          string
}

type SparkFilter

type SparkFilter struct {
	*BaseFilter
	*SparkFilterCfg
}

SparkFilter filter spark messages. some old spark messages need tobe discard

func NewSparkFilter

func NewSparkFilter(cfg *SparkFilterCfg) *SparkFilter

func (*SparkFilter) Filter

func (f *SparkFilter) Filter(msg *libs.FluentMsg) *libs.FluentMsg

func (*SparkFilter) GetName

func (f *SparkFilter) GetName() string

type SparkFilterCfg

type SparkFilterCfg struct {
	IgnoreRegex                   *regexp.Regexp
	Name, MsgKey, Tag, Identifier string
}

type SpringFilter

type SpringFilter struct {
	*BaseFilter
	*SpringFilterCfg
}

func NewSpringFilter

func NewSpringFilter(cfg *SpringFilterCfg) *SpringFilter

func (*SpringFilter) Filter

func (f *SpringFilter) Filter(msg *libs.FluentMsg) *libs.FluentMsg

func (*SpringFilter) GetName

func (f *SpringFilter) GetName() string

type SpringFilterCfg

type SpringFilterCfg struct {
	Name, Tag, Env, MsgKey, TagKey string
	Rules                          []*SpringReTagRule
}

type SpringReTagRule

type SpringReTagRule struct {
	NewTag string
	Regexp *regexp.Regexp
}

func ParseSpringRules

func ParseSpringRules(env string, cfg []interface{}) []*SpringReTagRule

ParseSpringRules parse settings to rules

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL