fwdset

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package fwdset implements a set of members.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Set

type Set struct {
	fwdobject.Base
	// contains filtered or unexported fields
}

A Set is a forwarding object that represents a set of members. Each member is a byte slice, and may represent things like packet field values. The set is used to perform one-of matches i.e. it answers the query if a given slice of bytes is one-of a given set of byte slices.

func Find

func Find(ctx *fwdcontext.Context, id *fwdpb.SetId) (*Set, error)

Find finds a set.

func New

func New(ctx *fwdcontext.Context, id *fwdpb.SetId) (*Set, error)

New creates a new set object with the specified set id.

func (*Set) Contains

func (c *Set) Contains(member []byte) bool

Contains returns true if the specific string exists in the set.

func (*Set) String

func (c *Set) String() string

String returns all the members in a ';' delimited string format. The bytes are printed in hex.

func (*Set) Update

func (c *Set) Update(members [][]byte)

Update updates the members in a set.

Jump to

Keyboard shortcuts

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