Documentation ¶
Index ¶
- Variables
- func CapTrailorPrinter(str string, caps string) string
- func HumanIMAHash(response *tetragon.GetEventsResponse, colorer *Colorer) string
- func HumanStackTrace(response *tetragon.GetEventsResponse, colorer *Colorer) string
- func PrintNS(ns int32) string
- type ColorMode
- type Colorer
- type CompactEncoder
- type EventEncoder
- type ProtojsonEncoder
- type TtyEncoder
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidEvent = errors.New("invalid event") ErrMissingProcessInfo = errors.New("process field is not set") ErrUnknownEventType = errors.New("unknown event type") )
View Source
var ( CLONE_NEWCGROUP = 0x2000000 CLONE_NEWIPC = 0x8000000 CLONE_NEWNET = 0x40000000 CLONE_NEWNS = 0x20000 CLONE_NEWPID = 0x20000000 CLONE_NEWTIME = 0x80 CLONE_NEWUSER = 0x10000000 CLONE_NEWUTS = 0x4000000 )
Functions ¶
func CapTrailorPrinter ¶
func HumanIMAHash ¶ added in v1.2.1
func HumanIMAHash(response *tetragon.GetEventsResponse, colorer *Colorer) string
func HumanStackTrace ¶ added in v1.0.0
func HumanStackTrace(response *tetragon.GetEventsResponse, colorer *Colorer) string
Types ¶
type Colorer ¶
type Colorer struct { Colors []*color.Color Red *color.Color Green *color.Color Blue *color.Color Cyan *color.Color Magenta *color.Color Yellow *color.Color }
func NewColorer ¶
type CompactEncoder ¶
type CompactEncoder struct { Writer io.Writer Colorer *Colorer Timestamps bool StackTraces bool ImaHash bool }
CompactEncoder encodes tetragon.GetEventsResponse in a short format with emojis and colors.
func NewCompactEncoder ¶
func NewCompactEncoder(w io.Writer, colorMode ColorMode, timestamps bool, stackTraces bool, imaHash bool) *CompactEncoder
NewCompactEncoder initializes and returns a pointer to CompactEncoder.
func (*CompactEncoder) Encode ¶
func (p *CompactEncoder) Encode(v interface{}) error
Encode implements EventEncoder.Encode.
func (*CompactEncoder) EventToString ¶
func (p *CompactEncoder) EventToString(response *tetragon.GetEventsResponse) (string, error)
type EventEncoder ¶
type EventEncoder interface {
Encode(v interface{}) error
}
EventEncoder is an interface for encoding tetragon.GetEventsResponse.
type ProtojsonEncoder ¶ added in v0.10.0
type ProtojsonEncoder struct {
// contains filtered or unexported fields
}
func NewProtojsonEncoder ¶ added in v0.10.0
func NewProtojsonEncoder(w io.Writer) *ProtojsonEncoder
func (*ProtojsonEncoder) Encode ¶ added in v0.10.0
func (p *ProtojsonEncoder) Encode(v interface{}) error
type TtyEncoder ¶ added in v0.10.0
func NewTtyEncoder ¶ added in v0.10.0
func NewTtyEncoder(w io.Writer, tty string) *TtyEncoder
func (*TtyEncoder) Encode ¶ added in v0.10.0
func (p *TtyEncoder) Encode(v interface{}) error
Encode implements EventEncoder.Encode.
Click to show internal directories.
Click to hide internal directories.