filter

package
v0.0.0-...-6b52c20 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2017 License: Apache-2.0 Imports: 0 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(bucket FilterKey, key []byte) error

func CheckThenAdd

func CheckThenAdd(bucket FilterKey, key []byte) (bool, error)

func Exists

func Exists(bucket FilterKey, key []byte) bool

func Regsiter

func Regsiter(h Filter)

func Remove

func Remove(bucket FilterKey, key []byte) error

Types

type Filter

type Filter interface {
	Exists(bucket FilterKey, key []byte) bool
	Add(bucket FilterKey, key []byte) error
	Delete(bucket FilterKey, key []byte) error
	CheckThenAdd(bucket FilterKey, key []byte) (bool, error)
}

type FilterKey

type FilterKey string

Jump to

Keyboard shortcuts

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