caretta

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UnknownConnectionRole = iota
	ClientConnectionRole  = iota
	ServerConnectionRole  = iota
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Caretta

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

func NewCaretta

func NewCaretta() *Caretta

func (*Caretta) Start

func (caretta *Caretta) Start()

func (*Caretta) Stop

func (caretta *Caretta) Stop()

type ConnectionIdentifier

type ConnectionIdentifier struct {
	Id    uint32
	Pid   uint32
	Tuple ConnectionTuple
	Role  uint32
}

type ConnectionThroughputStats

type ConnectionThroughputStats struct {
	BytesSent     uint64
	BytesReceived uint64
	IsActive      uint64
}

type ConnectionTuple

type ConnectionTuple struct {
	SrcIp   uint32
	DstIp   uint32
	SrcPort uint16
	DstPort uint16
}

type EbpfMap

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

func (*EbpfMap) Delete

func (m *EbpfMap) Delete(key interface{}) error

func (*EbpfMap) Iterate

func (m *EbpfMap) Iterate() IEbpfMapIterator

func (*EbpfMap) Lookup

func (m *EbpfMap) Lookup(key interface{}, val interface{}) error

type EbpfMapItertor

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

func (*EbpfMapItertor) Next

func (it *EbpfMapItertor) Next(key interface{}, val interface{}) bool

type IEbpfMap

type IEbpfMap interface {
	Lookup(interface{}, interface{}) error
	Iterate() IEbpfMapIterator
	Delete(interface{}) error
}

type IEbpfMapIterator

type IEbpfMapIterator interface {
	Next(interface{}, interface{}) bool
}

type IP

type IP uint32

func (IP) String

func (ip IP) String() string

type IPResolver

type IPResolver interface {
	ResolveIP(string) k8s.Workload
	StartWatching() error
	StopWatching()
}

type LinksTracer

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

func NewTracer

func NewTracer(resolver *k8s.K8sIPResolver) LinksTracer

initializes a LinksTracer object

func NewTracerWithObjs

func NewTracerWithObjs(resolver IPResolver, connections IEbpfMap, probes Probes) LinksTracer

func (*LinksTracer) Start

func (tracer *LinksTracer) Start() error

func (*LinksTracer) Stop

func (tracer *LinksTracer) Stop() error

func (*LinksTracer) TracesPollingIteration

func (tracer *LinksTracer) TracesPollingIteration(pastLinks map[NetworkLink]uint64) (map[NetworkLink]uint64, map[NetworkLink]uint64)

a single polling from the eBPF maps iterating the traces from the kernel-space, summing each network link

type NetworkLink struct {
	Client     caretta_k8s.Workload
	Server     caretta_k8s.Workload
	ServerPort uint16
	Role       uint32
}

"final" type of link, like an edge on the graph

type Probes

type Probes interface {
	UnloadProbes() error
}

Jump to

Keyboard shortcuts

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