tcprobe

package
v0.0.0-...-4d801b8 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BTFHubURL is the URL to BTFHub github repository
	BTFHubURL = "https://github.com/aquasecurity/btfhub-archive/raw/main/%s/%s/x86_64/%s.btf.tar.xz"
)

Variables

This section is empty.

Functions

func Getpid

func Getpid() int32

Getpid returns the current process ID in the host namespace

func NumCPU

func NumCPU() (int, error)

NumCPU returns the count of CPUs in the CPU affinity mask of the pid 1 process

Types

type DatadogLogs

type DatadogLogs struct {
	EventChan chan interface{}
	// contains filtered or unexported fields
}

DatadogLogs Datadog logs forwarder

func (*DatadogLogs) Start

func (dl *DatadogLogs) Start(agentURL string) error

Start sets up communication with the Datadog agent

func (*DatadogLogs) Stop

func (dl *DatadogLogs) Stop() error

Stop stops the logs forwarder

type LogLevel

type LogLevel logrus.Level

LogLevel is a wrapper around logrus.Level to unmarshal a log level from yaml

func (*LogLevel) UnmarshalYAML

func (kll *LogLevel) UnmarshalYAML(value *yaml.Node) error

UnmarshalYAML parses a string representation of a logrus log level

type Options

type Options struct {
	// from config file
	LogLevel       LogLevel `yaml:"log_level"`
	Output         string   `yaml:"output"`
	VMLinux        string   `yaml:"vmlinux"`
	DatadogLogsURL string   `yaml:"datadog_logs_url"`

	EventHandler func(data []byte) error `yaml:"-"`
}

Options contains the parameters of TCProbe

func NewOptions

func NewOptions() *Options

NewOptions returns a default set of options

func (Options) IsValid

func (o Options) IsValid() error

type TCProbe

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

TCProbe is the main TCProbe structure

func NewTCProbe

func NewTCProbe(options *Options) (*TCProbe, error)

NewTCProbe creates a new TCProbe instance

func (*TCProbe) Start

func (tp *TCProbe) Start() error

Start hooks on the requested symbols and begins tracing

func (*TCProbe) Stop

func (tp *TCProbe) Stop() error

Stop shuts down TCProbe

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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