nettop

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InitNetns = 0
)

Functions

func GetAddressAndDialer

func GetAddressAndDialer(endpoint string) (string, func(ctx context.Context, addr string) (net.Conn, error), error)

GetAddressAndDialer returns the address parsed from the given endpoint and a context dialer.

func GetNodeIPs added in v1.0.0

func GetNodeIPs() ([]string, error)

func GetNodeName

func GetNodeName() string

func NewRemoteRuntimeService

func NewRemoteRuntimeService(endpoint string, connectionTimeout time.Duration) (internalapi.RuntimeService, error)

func StartCache

func StartCache(ctx context.Context, sidecarMode bool) error

func StopCache

func StopCache()

Types

type CRIInfo added in v1.0.0

type CRIInfo struct {
	Version        string
	RuntimeName    string
	RuntimeVersion string
}

type Config added in v1.0.0

type Config struct {
	Linux Linux `json:"linux"`
}

type Entity

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

func GetAllEntity

func GetAllEntity() []*Entity

func GetEntityByNetns

func GetEntityByNetns(nsinum int) (*Entity, error)

GetEntityByNetns get entity by netns, if netns was deleted asynchrously, return nil; otherwise return error

func GetEntityByPid

func GetEntityByPid(pid int) (*Entity, error)

func GetHostNetworkEntity added in v1.0.0

func GetHostNetworkEntity() (*Entity, error)

func (*Entity) GetIP

func (e *Entity) GetIP() string

func (*Entity) GetNetNsFd

func (e *Entity) GetNetNsFd() (int, error)

func (*Entity) GetNetns

func (e *Entity) GetNetns() int

func (*Entity) GetNetnsMountPoint

func (e *Entity) GetNetnsMountPoint() string

func (*Entity) GetNsHandle

func (e *Entity) GetNsHandle() (netns.NsHandle, error)

func (*Entity) GetPid

func (e *Entity) GetPid() int

GetPid return a random initPid of entify, if no process in netns,return 0

func (*Entity) GetPids

func (e *Entity) GetPids() []int

func (*Entity) GetPodName

func (e *Entity) GetPodName() string

func (*Entity) GetPodNamespace

func (e *Entity) GetPodNamespace() string

func (*Entity) IsHostNetwork

func (e *Entity) IsHostNetwork() bool

type Linux added in v1.0.0

type Linux struct {
	CgroupParent string `json:"cgroup_parent"`
}

Jump to

Keyboard shortcuts

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