sampledecoder

package
v0.0.0-...-2132a78 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const CookieSize = 8
View Source
const OVSDBTimeout = 10 * time.Second

Variables

View Source
var SampleEndian = getEndian()

Functions

func NewNBClientWithConfig

func NewNBClientWithConfig(ctx context.Context, cfg dbConfig) (client.Client, error)

func NewOVSDBClientWithConfig

func NewOVSDBClientWithConfig(ctx context.Context, cfg dbConfig) (client.Client, error)

Types

type Cookie struct {
	ObsDomainID uint32
	ObsPointID  uint32
}

type SampleDecoder

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

func NewSampleDecoder

func NewSampleDecoder(ctx context.Context, nbdbSocketPath string) (*SampleDecoder, error)

NewSampleDecoder creates a new SampleDecoder and initializes the OVSDB client.

func NewSampleDecoderWithDefaultCollector

func NewSampleDecoderWithDefaultCollector(ctx context.Context, nbdbSocketPath string, ownerName string, groupID int) (*SampleDecoder, error)

NewSampleDecoderWithDefaultCollector creates a new SampleDecoder, initializes the OVSDB client and adds the default collector. It allows to set the groupID and ownerName for the created default collector. If the default collector already exists with a different owner or different groupID an error will be returned. Shutdown should be called to clean up the collector from the OVSDB.

func (*SampleDecoder) AddCollector

func (d *SampleDecoder) AddCollector(collectorID, groupID int, ownerName string) error

func (*SampleDecoder) DecodeCookie8Bytes

func (d *SampleDecoder) DecodeCookie8Bytes(cookie [8]byte) (model.NetworkEvent, error)

func (*SampleDecoder) DecodeCookieBytes

func (d *SampleDecoder) DecodeCookieBytes(cookie []byte) (model.NetworkEvent, error)

func (*SampleDecoder) DecodeCookieIDs

func (d *SampleDecoder) DecodeCookieIDs(obsDomainID, obsPointID uint32) (model.NetworkEvent, error)

func (*SampleDecoder) DeleteCollector

func (d *SampleDecoder) DeleteCollector(collectorID int) error

func (*SampleDecoder) GetInterfaceUDNs

func (d *SampleDecoder) GetInterfaceUDNs() (map[string]string, error)

GetInterfaceUDNs returns a map of all pod interface names to their corresponding (C)UDN namespaced names. default network or NAD that is not created by (C)UDN is represented by an empty string. UDN namespace+name are joined by "/", CUDN will just have a name.

func (*SampleDecoder) Shutdown

func (d *SampleDecoder) Shutdown()

Jump to

Keyboard shortcuts

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