profileclient

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package profileclient to handle profiling of kubearmor telemetry events

Index

Constants

View Source
const (
	ColumnNamespace     = "Namespace"
	ColumnContainerName = "ContainerName"
	ColumnProcessName   = "ProcName"
	ColumnResource      = "Resource"
	ColumnResult        = "Result"
	ColumnCount         = "Count"
	ColumnTimestamp     = "Timestamp"
)

Column keys

Variables

View Source
var (

	//ColumnStyle for column color
	ColumnStyle = lipgloss.NewStyle().
		Foreground(lipgloss.Color("#00af00")).Align(lipgloss.Center).Bold(true)
)

Functions

func AggregateSummary added in v0.13.12

func AggregateSummary(inputMap map[Profile]*Frequency, Operation string) map[Profile]*Frequency

AggregateSummary used to aggregate summary data for a less cluttered view of file and process data

func Start

func Start(o Options)

Start entire TUI

Types

type Frequency

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

Frequency and Timestamp data for another map

type Model

type Model struct {
	File    table.Model
	Process table.Model
	Network table.Model
	Syscall table.Model
	// contains filtered or unexported fields
}

Model for main Bubble Tea

func NewModel

func NewModel() Model

NewModel initializates new bubbletea model

func (Model) Init

func (m Model) Init() tea.Cmd

Init calls initial functions if needed

func (Model) Update

func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd)

Update Bubble Tea function to Update with incoming events

func (Model) View

func (m Model) View() string

View Renders Bubble Tea UI

type Options

type Options struct {
	Namespace string
	Pod       string
	GRPC      string
	Container string
	Save      bool
}

Options for filter

type Profile

type Profile struct {
	Namespace     string `json:"namespace"`
	ContainerName string `json:"container-name"`
	Process       string `json:"process"`
	Resource      string `json:"resource"`
	Result        string `json:"result"`
	Data          string `json:"data"`
	Count         int    `json:"count"`
	Time          string `json:"time"`
}

Profile Row Data to display

func (Profile) MarshalText added in v0.13.16

func (p Profile) MarshalText() (text []byte, err error)

type SomeData

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

SomeData stores incoming row data

Jump to

Keyboard shortcuts

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