log

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: 26 Imported by: 3

Documentation

Overview

Package log connects and observes telemetry from KubeArmor

Package log connects and observes telemetry from KubeArmor

Index

Constants

View Source
const (
	SelfCertProvider   string = "self"
	ExternalCertLoader string = "external"
)

Variables

View Source
var (
	CNamespace     regexType
	CLogtype       regexType
	COperation     regexType
	CContainerName regexType
	CPodName       regexType
	CSource        regexType
	CResource      regexType
)

Regex Compiled Structs

View Source
var Limitchan chan bool

Limitchan handles telemetry event output limit

View Source
var StopChan chan struct{}

StopChan Channel

View Source
var UnblockSignal error

UnblockSignal is a flag to check whether the Watch* APIs have exited or signal has rcvd

Functions

func GetOSSigChannel

func GetOSSigChannel() chan os.Signal

GetOSSigChannel Function

func StartObserver

func StartObserver(c *k8s.Client, o Options) error

StartObserver Function

func StrToFile

func StrToFile(str, destFile string)

StrToFile Function

func WatchTelemetryHelper added in v0.7.7

func WatchTelemetryHelper(arr []byte, t string, o Options)

WatchTelemetryHelper handles Alerts and Logs

Types

type EventInfo added in v0.7.8

type EventInfo struct {
	Data []byte // json marshalled byte data for alert/log
	Type string // "Alert"/"Log"
}

EventInfo Event data signalled on EventChan

type Feeder

type Feeder struct {
	// flag
	Running bool

	// wait group
	WgClient sync.WaitGroup
	// contains filtered or unexported fields
}

Feeder Structure

func NewClient

func NewClient(server string, o Options, c kubernetes.Interface) (*Feeder, error)

NewClient Function

func (*Feeder) DestroyClient

func (fd *Feeder) DestroyClient() error

DestroyClient Function

func (*Feeder) DoHealthCheck

func (fd *Feeder) DoHealthCheck() bool

DoHealthCheck Function

func (*Feeder) WatchAlerts

func (fd *Feeder) WatchAlerts(o Options) error

WatchAlerts Function

func (*Feeder) WatchLogs

func (fd *Feeder) WatchLogs(o Options) error

WatchLogs Function

func (*Feeder) WatchMessages

func (fd *Feeder) WatchMessages(msgPath string, jsonFormat bool) error

WatchMessages Function

type Options

type Options struct {
	GRPC             string
	Secure           bool
	TlsCertPath      string
	TlsCertProvider  string
	ReadCAFromSecret bool
	MsgPath          string
	LogPath          string
	LogFilter        string
	JSON             bool
	Namespace        string
	LogType          string
	Operation        string
	ContainerName    string
	PodName          string
	Source           string
	Resource         string
	Limit            uint32
	Selector         []string
	EventChan        chan EventInfo // channel to send events on
}

Options Structure

Jump to

Keyboard shortcuts

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