interest

package
v0.1.0-alpha.5 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InterestDef

type InterestDef struct {
	Name                 string
	Description          string
	Disabled             bool `yaml:",omitempty"`
	Matcher              InterestMatcher
	SuppressDurationSecs uint64 `yaml:"suppressDurationSecs,omitempty"`
}

type InterestDispatcher

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

func NewInterestDispatcher

func NewInterestDispatcher(logger *zap.Logger, interests []InterestDef, botToken string, toChat int64) (*InterestDispatcher, error)

func (*InterestDispatcher) Close

func (d *InterestDispatcher) Close()

func (*InterestDispatcher) Dispatch

func (d *InterestDispatcher) Dispatch(message *kafka.Message)

func (*InterestDispatcher) SwapState

func (d *InterestDispatcher) SwapState(that *InterestDispatcher)

type InterestMatcher

type InterestMatcher struct {
	All        []*InterestMatcher
	Any        []*InterestMatcher
	Not        *InterestMatcher
	Status     *InterestMatcher_Status
	Host       *string
	Method     *string
	UriPattern *string `yaml:"uriPattern"`
}

type InterestMatcher_Status

type InterestMatcher_Status struct {
	Min uint16
	Max uint16
}

Jump to

Keyboard shortcuts

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