Documentation ¶
Index ¶
- type EventType
- func (z *EventType) DecodeMsg(dc *msgp.Reader) (err error)
- func (z EventType) EncodeMsg(en *msgp.Writer) (err error)
- func (z EventType) MarshalMsg(b []byte) (o []byte, err error)
- func (z EventType) Msgsize() (s int)
- func (e EventType) String() string
- func (z *EventType) UnmarshalMsg(bts []byte) (o []byte, err error)
- type ProcessEvent
- func (z *ProcessEvent) DecodeMsg(dc *msgp.Reader) (err error)
- func (z *ProcessEvent) EncodeMsg(en *msgp.Writer) (err error)
- func (z *ProcessEvent) MarshalMsg(b []byte) (o []byte, err error)
- func (z *ProcessEvent) Msgsize() (s int)
- func (z *ProcessEvent) UnmarshalMsg(bts []byte) (o []byte, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EventType ¶
type EventType int32
EventType represents the type of the process lifecycle event
func NewEventType ¶
NewEventType returns the EventType associated with a string
func (EventType) MarshalMsg ¶
MarshalMsg implements msgp.Marshaler
func (EventType) Msgsize ¶
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
type ProcessEvent ¶
type ProcessEvent struct { EventType EventType `json:"event_type" msg:"event_type"` CollectionTime time.Time `json:"collection_time" msg:"collection_time"` Pid uint32 `json:"pid" msg:"pid"` ContainerID string `json:"container_id" msg:"container_id"` Ppid uint32 `json:"ppid" msg:"ppid"` UID uint32 `json:"uid" msg:"uid"` GID uint32 `json:"gid" msg:"gid"` Username string `json:"username" msg:"username"` Group string `json:"group" msg:"group"` Exe string `json:"exe" msg:"exe"` Cmdline []string `json:"cmdline" msg:"cmdline"` ForkTime time.Time `json:"fork_time,omitempty" msg:"fork_time,omitempty"` ExecTime time.Time `json:"exec_time,omitempty" msg:"exec_time,omitempty"` ExitTime time.Time `json:"exit_time,omitempty" msg:"exit_time,omitempty"` ExitCode uint32 `json:"exit_code,omitempty" msg:"exit_code,omitempty"` }
ProcessEvent is a common interface for collected process events shared across multiple event listener implementations
func NewMockedExecEvent ¶
NewMockedExecEvent creates a mocked Exec event for tests
func NewMockedExitEvent ¶
func NewMockedExitEvent(ts time.Time, pid uint32, exe string, args []string, code uint32) *ProcessEvent
NewMockedExitEvent creates a mocked Exit event for tests
func NewMockedForkEvent ¶
NewMockedForkEvent creates a mocked Fork event for tests
func (*ProcessEvent) DecodeMsg ¶
func (z *ProcessEvent) DecodeMsg(dc *msgp.Reader) (err error)
DecodeMsg implements msgp.Decodable
func (*ProcessEvent) EncodeMsg ¶
func (z *ProcessEvent) EncodeMsg(en *msgp.Writer) (err error)
EncodeMsg implements msgp.Encodable
func (*ProcessEvent) MarshalMsg ¶
func (z *ProcessEvent) MarshalMsg(b []byte) (o []byte, err error)
MarshalMsg implements msgp.Marshaler
func (*ProcessEvent) Msgsize ¶
func (z *ProcessEvent) Msgsize() (s int)
Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message
func (*ProcessEvent) UnmarshalMsg ¶
func (z *ProcessEvent) UnmarshalMsg(bts []byte) (o []byte, err error)
UnmarshalMsg implements msgp.Unmarshaler