fwdflowcounter

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package fwdflowcounter implements the functionality of Flow Counters. Flow Counters are objects that are managed by the client. They track the number of packets and octets that match each row in the flow table.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Release

func Release(fc *FlowCounter) error

Release releases a reference to a FlowCounter.

Types

type FlowCounter

type FlowCounter struct {
	fwdobject.Base
}

FlowCounter implements the per flow counter.

func Acquire

func Acquire(ctx *fwdcontext.Context, id *fwdpb.FlowCounterId) (*FlowCounter, error)

Acquire acquires a reference to a FlowCounter.

func New

New is used to create a per flow counter, which will store byte and packet counts.

func (*FlowCounter) Process

func (fc *FlowCounter) Process(octetCount, packetCount uint32) error

Process is used to process a packet and increment the octet and packet counts.

func (*FlowCounter) Query

func (fc *FlowCounter) Query() (*fwdpb.FlowCounter, error)

Query is used to read out the packet and octet counts stored in flow counters.

func (*FlowCounter) String

func (fc *FlowCounter) String() string

String method formats the FlowCounter.

Jump to

Keyboard shortcuts

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