condition

package
v0.5.12 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Condition

type Condition interface {
	Check(ctx context.Context, msg message.Message) bool
}

type Custom

type Custom func(ctx context.Context, msg message.Message) bool

Custom condition checker

func (Custom) Check

func (c Custom) Check(ctx context.Context, msg message.Message) bool

Check message by condition

type Expression

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

Expression condition checker

func NewExpression

func NewExpression(where string) (_ *Expression, err error)

NewExpression creates new condition expression

func (*Expression) Check

func (e *Expression) Check(ctx context.Context, msg message.Message) bool

Check message by condition

Jump to

Keyboard shortcuts

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