getters

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DNSGetter

type DNSGetter interface {
	// GetNamesOf fetches FQDNs of a given IP from the perspective of
	// the endpoint with ID sourceEpID. The returned names must not have
	// trailing dots.
	GetNamesOf(sourceEpID uint32, ip netip.Addr) (names []string)
}

DNSGetter ...

type EndpointGetter

type EndpointGetter interface {
	// GetEndpointInfo looks up endpoint by IP address.
	GetEndpointInfo(ip netip.Addr) (endpoint v1.EndpointInfo, ok bool)
	// GetEndpointInfo looks up endpoint by id
	GetEndpointInfoByID(id uint16) (endpoint v1.EndpointInfo, ok bool)
}

EndpointGetter ...

type IPGetter

type IPGetter interface {
	// GetK8sMetadata returns Kubernetes metadata for the given IP address.
	GetK8sMetadata(ip netip.Addr) *ipcache.K8sMetadata
	// LookupSecIDByIP returns the corresponding security identity that
	// endpoint IP maps to as well as if the corresponding entry exists.
	LookupSecIDByIP(ip netip.Addr) (ipcache.Identity, bool)
}

IPGetter fetches per-IP metadata

type IdentityGetter

type IdentityGetter interface {
	// GetIdentity fetches a full identity object given a numeric security id.
	GetIdentity(id uint32) (*identity.Identity, error)
}

IdentityGetter ...

type LinkGetter

type LinkGetter interface {
	// GetIfNameCached returns the name of an interface (if it exists) by
	// looking it up in a regularly updated cache
	GetIfNameCached(ifIndex int) (string, bool)

	// Name returns the name of an interface, or returns a string
	// containing the ifindex if the link name cannot be determined.
	Name(ifIndex uint32) string
}

LinkGetter fetches local link information.

type PodMetadataGetter

type PodMetadataGetter interface {
	// GetPodMetadataForContainer returns the pod metadata for the given container
	// cgroup id.
	GetPodMetadataForContainer(cgroupId uint64) *cgroupManager.PodMetadata
}

PodMetadataGetter returns pod metadata based on identifiers received from datapath trace events.

type ServiceGetter

type ServiceGetter interface {
	GetServiceByAddr(ip netip.Addr, port uint16) *flowpb.Service
}

ServiceGetter fetches service metadata.

type StoreGetter

type StoreGetter interface {
	// GetK8sStore return the k8s watcher cache store for the given resource name.
	// Currently only resource networkpolicy and namespace are supported.
	// WARNING: the objects returned by these stores can't be used to create
	// update objects into k8s as well as the objects returned by these stores
	// should only be used for reading.
	GetK8sStore(name string) cache.Store
}

StoreGetter ...

Jump to

Keyboard shortcuts

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