instrumented

package
v0.0.0-...-ee0e00b Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: Apache-2.0 Imports: 6 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[K comparable] struct {
	// contains filtered or unexported fields
}

func New

func New[K comparable](filter filter.Filter[K], stats stats.Stats) *Filter[K]

NewFilter returns a new Filter.

func (*Filter[K]) Add

func (rf *Filter[K]) Add(item K) filter.Filter[K]

Add adds the item to the filter.

func (*Filter[K]) AddAll

func (rf *Filter[K]) AddAll(other filter.Filter[K]) filter.Filter[K]

AddAll adds all items from the other filter to the filter.

func (*Filter[K]) Capacity

func (rf *Filter[K]) Capacity() int

Capacity returns the capacity of the filter.

func (*Filter[K]) Clear

func (rf *Filter[K]) Clear() filter.Filter[K]

Clear clears the filter.

func (*Filter[K]) Copy

func (rf *Filter[K]) Copy() filter.Filter[K]

Copy returns a copy of the filter.

func (*Filter[K]) Count

func (rf *Filter[K]) Count() int

Count returns the number of items in the filter.

func (*Filter[K]) DoesNotContain

func (rf *Filter[K]) DoesNotContain(item K) bool

DoesNotContain returns true if the item is not in the filter.

func (*Filter[K]) Dump

func (sf *Filter[K]) Dump(log *zap.SugaredLogger, prefix string)

Dump dumps the filter to the log.

func (*Filter[K]) Equal

func (sf *Filter[K]) Equal(other filter.Filter[K]) bool

Equal returns true if the other filter is equal to the filter.

func (*Filter[K]) MarshalCBOR

func (sf *Filter[K]) MarshalCBOR() ([]byte, error)

MarshalCBOR marshals the Filter into the CBOR-encoded wire format.

func (*Filter[K]) MarshalJSON

func (sf *Filter[K]) MarshalJSON() ([]byte, error)

MarshalJSON marshals the Filter into the JSON-encoded wire format.

func (*Filter[K]) TryAddAll

func (rf *Filter[K]) TryAddAll(other filter.Filter[K]) error

TryAddAll adds all items from the other filter to the filter.

func (*Filter[K]) UnmarshalCBOR

func (sf *Filter[K]) UnmarshalCBOR(bytes []byte) error

UnmarshalCBOR unmarshals the CBOR-encoded wire format into the Filter.

func (*Filter[K]) UnmarshalJSON

func (sf *Filter[K]) UnmarshalJSON(bytes []byte) error

UnmarshalJSON unmarshals the JSON-encoded wire format into the Filter.

Jump to

Keyboard shortcuts

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