filter

package
v0.6.3-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2019 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Overview

Package filter implements event filters.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter interface {
	Compare(Filter) bool
	Trigger(data interface{})
}

type FilterEvent

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

type Filters

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

func New

func New() *Filters

func (*Filters) Get

func (f *Filters) Get(i int) Filter

func (*Filters) Install

func (f *Filters) Install(watcher Filter) int

func (*Filters) Match

func (f *Filters) Match(a, b Filter) bool

func (*Filters) Notify

func (f *Filters) Notify(filter Filter, data interface{})

func (*Filters) Start

func (f *Filters) Start()

func (*Filters) Stop

func (f *Filters) Stop()

func (*Filters) Uninstall

func (f *Filters) Uninstall(id int)

type Generic

type Generic struct {
	Str1, Str2, Str3 string
	Data             map[string]struct{}

	Fn func(data interface{})
}

func (Generic) Compare

func (self Generic) Compare(f Filter) bool

self = registered, f = incoming

func (Generic) Trigger

func (self Generic) Trigger(data interface{})

Jump to

Keyboard shortcuts

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