subscription

package
v0.1.1-alpha Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2017 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FS_DO_SYS_OPEN_KPROBE_NAME      = "fs/do_sys_open"
	FS_DO_SYS_OPEN_KPROBE_ADDRESS   = "do_sys_open"
	FS_DO_SYS_OPEN_KPROBE_FETCHARGS = "filename=+0(%si):string flags=%dx:s32 mode=%cx:s32"
)
View Source
const (
	KPROBE_BIND_SYMBOL    = "sys_bind"
	KPROBE_BIND_FETCHARGS = "" /* 170-byte string literal not displayed */

	KPROBE_CONNECT_SYMBOL    = "sys_connect"
	KPROBE_CONNECT_FETCHARGS = "" /* 170-byte string literal not displayed */

	KPROBE_SENDMSG_SYMBOL    = "sys_sendmsg"
	KPROBE_SENDMSG_FETCHARGS = "" /* 198-byte string literal not displayed */

	KPROBE_SENDTO_SYMBOL    = "sys_sendto"
	KPROBE_SENDTO_FETCHARGS = "" /* 170-byte string literal not displayed */
)
View Source
const UnknownID = "_"

UnknownID is the sentinal value for an unknown process ID or container ID

Variables

View Source
var (
	// SensorID is a unique ID of the running instance of the
	// Sensor. A restart of the Sensor generates a new ID.
	SensorID string
)

Functions

func HostMonotimeNanosToSensor

func HostMonotimeNanosToSensor(hostMonotime int64) int64

HostMonotimeNanosToSensor converts the given host monotonic clock time to monotonic nanos since Sensor start time. This is done to ensure that timestamps on emitted events can only be compared among events with the same SensorID value.

func NewChargenSensor

func NewChargenSensor(filter *api.ChargenEventFilter) (*stream.Stream, error)

NewChargenSensor creates a new chargen sensor configured by the given Filter

func NewEvent

func NewEvent() *api.Event

NewEvent creates a new api.Event

func NewSubscription

func NewSubscription(sub *api.Subscription) (*stream.Stream, error)

NewSubscription creates a new telemetry subscription from the given api.Subscription descriptor. NewSubscription returns a stream.Stream of api.Events matching the specified filters. Closing the Stream cancels the subscription.

func NewTickerSensor

func NewTickerSensor(filter *api.TickerEventFilter) (*stream.Stream, error)

NewTickerSensor creates a new ticker sensor configured by the given Selector

func ProcessMonitor

func ProcessMonitor() *processMonitor

ProcessMonitor returns the global instance of the process monitor

Types

type MetricsCounters

type MetricsCounters struct {
	// Number of events created during the sample period
	Events uint64

	// Number of subscriptions
	Subscriptions int32
}

Counters used for metrics

var (
	// Current metrics counters, will be incremented
	Metrics MetricsCounters
)

Jump to

Keyboard shortcuts

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