traffic

package
v1.0.12 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculateWasmEncoderID

func CalculateWasmEncoderID(wasmEncoderData []byte) uint64

CalculateWasmEncoderID - Creates an Encoder ID based on the hash of the wasm bin

Types

type TrafficEncoder

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

TrafficEncoder - Implements the `Encoder` interface using a wasm backend

func CreateTrafficEncoder

func CreateTrafficEncoder(name string, wasm []byte, logger TrafficEncoderLogCallback) (*TrafficEncoder, error)

CreateTrafficEncoder - Initialize an WASM runtime using the provided module name, code, and log callback

func (*TrafficEncoder) Close

func (t *TrafficEncoder) Close() error

func (*TrafficEncoder) Decode

func (t *TrafficEncoder) Decode(data []byte) ([]byte, error)

Decode - Decode bytes using the wasm backend

func (*TrafficEncoder) Encode

func (t *TrafficEncoder) Encode(data []byte) ([]byte, error)

Encode - Encode data using the wasm backend

type TrafficEncoderLogCallback

type TrafficEncoderLogCallback func(string)

TrafficEncoderLogCallback - Callback function exposed to the wasm runtime to log messages

Jump to

Keyboard shortcuts

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