filter

package
v2.0.0-...-73bef05 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter struct {
	InChan  chan *message.Message
	OutChan chan *message.Message
	Options *Options
	// contains filtered or unexported fields
}

Filter filter message by rules

func New

func New(opts ...Option) (filter *Filter, err error)

New returns a new Filter

func (*Filter) Closed

func (f *Filter) Closed() chan struct{}

func (*Filter) Run

func (f *Filter) Run(ctx context.Context) (err error)

Run Filter start working

type Option

type Option func(options *Options)

Option function config Options

func WithPipe

func WithPipe(p *pipeline2.Pipeline) Option

WithPipe sets pipeline to Options

type Options

type Options struct {
	Pipe *pipeline2.Pipeline
}

Options is an interface abstraction for dynamic configuration

Jump to

Keyboard shortcuts

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