filters

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: MIT Imports: 3 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 struct {
	// the underlying wire
	wire.Wire
	// contains filtered or unexported fields
}

wire filter

func WrapFilter

func WrapFilter(w wire.Wire) *Filter

func (*Filter) AddMiddleware

func (filter *Filter) AddMiddleware(m Middleware)

func (*Filter) Decode

func (filter *Filter) Decode(msg *message.Message) error

func (*Filter) Encode

func (filter *Filter) Encode(msg *message.Message) error

type Middleware

type Middleware interface {
	// modify ingress packet
	Ingress(*message.Packet) (bool, error)
	// modify egress packet
	Egress(*message.Packet) (bool, error)
}

packet middleware

Jump to

Keyboard shortcuts

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