Documentation
¶
Index ¶
Constants ¶
View Source
const ( // quark_queue_attr{} flags QQ_THREAD_EVENTS = int(C.QQ_THREAD_EVENTS) QQ_KPROBE = int(C.QQ_KPROBE) QQ_EBPF = int(C.QQ_EBPF) QQ_MIN_AGG = int(C.QQ_MIN_AGG) QQ_ENTRY_LEADER = int(C.QQ_ENTRY_LEADER) QQ_ALL_BACKENDS = int(C.QQ_ALL_BACKENDS) // Event.events QUARK_EV_FORK = uint64(C.QUARK_EV_FORK) QUARK_EV_EXEC = uint64(C.QUARK_EV_EXEC) QUARK_EV_EXIT = uint64(C.QUARK_EV_EXIT) QUARK_EV_SETPROCTITLE = uint64(C.QUARK_EV_SETPROCTITLE) // EntryLeaderType QUARK_ELT_UNKNOWN = int(C.QUARK_ELT_UNKNOWN) QUARK_ELT_INIT = int(C.QUARK_ELT_INIT) QUARK_ELT_KTHREAD = int(C.QUARK_ELT_KTHREAD) QUARK_ELT_SSHD = int(C.QUARK_ELT_SSHD) QUARK_ELT_SSM = int(C.QUARK_ELT_SSM) QUARK_ELT_CONTAINER = int(C.QUARK_ELT_CONTAINER) QUARK_ELT_TERM = int(C.QUARK_ELT_TERM) QUARK_ELT_CONSOLE = int(C.QUARK_ELT_CONSOLE) )
View Source
const ( QUARK_VL_SILENT = int(C.QUARK_VL_SILENT) QUARK_VL_WARN = int(C.QUARK_VL_WARN) QUARK_VL_DEBUG = int(C.QUARK_VL_DEBUG) )
Variables ¶
View Source
var ErrUndefined = errors.New("undefined")
Functions ¶
Types ¶
type Event ¶
Events is a bitmask of QUARK_EV_* and expresses what triggered this event, Process is the context of the Event.
type Proc ¶
type Proc struct { CapInheritable uint64 CapPermitted uint64 CapEffective uint64 CapBset uint64 CapAmbient uint64 TimeBoot uint64 Ppid uint32 Uid uint32 Gid uint32 Suid uint32 Sgid uint32 Euid uint32 Egid uint32 Pgid uint32 Sid uint32 EntryLeader uint32 EntryLeaderType uint32 TtyMajor uint32 TtyMinor uint32 UtsInonum uint32 IpcInonum uint32 MntInonum uint32 NetInonum uint32 Valid bool }
Proc carries data on the state of the process. Only vaid if `Valid` is set.
type Process ¶
type Process struct { Pid uint32 // Always present Proc Proc // Only meaningful if Proc.Valid (QUARK_F_PROC) Exit Exit // Only meaningful if Exit.Valid (QUARK_F_EXIT) Comm string // QUARK_F_COMM Filename string // QUARK_F_FILENAME Cmdline []string // QUARK_F_CMDLINE Cwd string // QUARK_F_CWD Cgroup string // QUARK_F_CGROUP }
Process represents a single process.
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
Queue holds the state of a quark instance.
func (*Queue) Block ¶
Block blocks until there are events or an undefined timeout expires. GetEvent should be called once Block returns.
func (*Queue) Lookup ¶
Lookup looks up for the Process associated with PID in quark's internal cache.
type QueueAttr ¶
QueueAttr defines the attributes for the Quark queue.
func DefaultQueueAttr ¶
func DefaultQueueAttr() QueueAttr
DefaultQueueAttr returns the default attributes for the queue.
Click to show internal directories.
Click to hide internal directories.