networktracer

package
v0.11.0-rc Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectToContainerCollectionConfig

type ConnectToContainerCollectionConfig[Event any] struct {
	Tracer        Tracer[Event]
	Resolver      containercollection.ContainerResolver
	Selector      containercollection.ContainerSelector
	EventCallback func(*containercollection.Container, Event)
	Base          func(eventtypes.Event) Event
}

type ConnectionToContainerCollection

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

func ConnectToContainerCollection

func ConnectToContainerCollection[Event any](
	config *ConnectToContainerCollectionConfig[Event],
) (*ConnectionToContainerCollection, error)

ConnectToContainerCollection connects a networking tracer to the container collection package. It creates the needed logic to call the Attach() function on the tracer each time a container is created and to call Detach() each time the container is removed. Callers must call Close() on the returned ConnectionToContainerCollection object.

func (*ConnectionToContainerCollection) Close

type Tracer

type Tracer[Event any] interface {
	Attach(key string, pid uint32, eventCallback func(Event)) error
	Detach(key string) error
}

Jump to

Keyboard shortcuts

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