net

package
v0.0.0-...-3dd6856 Latest Latest
Warning

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

Go to latest
Published: May 20, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetNetworkTracerSocketPath

func SetNetworkTracerSocketPath(socketPath string)

SetNetworkTracerSocketPath provides a unix socket path location to be used by the remote network tracer. This needs to be called before GetRemoteNetworkTracerUtil.

func ShouldLogTracerUtilError

func ShouldLogTracerUtilError() bool

ShouldLogTracerUtilError will return whether or not errors sourced from the RemoteNetTracerUtil _should_ be logged, for less noisy logging. We only want to log errors if the tracer has been initialized, or it's the first error for a particular tracer status (e.g. retrying, permafail)

Types

type Conn

type Conn interface {
	// GetListener returns the underlying net.Listener
	GetListener() net.Listener

	// Stop and clean up resources for the underlying connection
	Stop()
}

Conn is a wrapper over some net.Listener

type RemoteNetTracerUtil

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

RemoteNetTracerUtil wraps interactions with a remote network tracer service

func GetRemoteNetworkTracerUtil

func GetRemoteNetworkTracerUtil() (*RemoteNetTracerUtil, error)

GetRemoteNetworkTracerUtil returns a ready to use RemoteNetTracerUtil. It is backed by a shared singleton.

func (*RemoteNetTracerUtil) GetConnections

func (r *RemoteNetTracerUtil) GetConnections(clientID string) ([]ebpf.ConnectionStats, error)

GetConnections returns a set of active network connections, retrieved from the network tracer service

type UDSListener

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

UDSListener (Unix Domain Socket Listener)

func NewUDSListener

func NewUDSListener(cfg *config.AgentConfig) (*UDSListener, error)

NewUDSListener returns an idle UDSListener

func (*UDSListener) GetListener

func (l *UDSListener) GetListener() net.Listener

GetListener will return the underlying Conn's net.Listener

func (*UDSListener) Stop

func (l *UDSListener) Stop()

Stop closes the UDSListener connection and stops listening

Jump to

Keyboard shortcuts

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