log

package
v0.9.7 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2022 License: Apache-2.0 Imports: 18 Imported by: 3

Documentation

Overview

Package log connects and observes telemetry from KubeArmor

Index

Constants

This section is empty.

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

Functions

func GetOSSigChannel

func GetOSSigChannel() chan os.Signal

GetOSSigChannel Function

func StartObserver

func StartObserver(o Options) error

StartObserver Function

func StopObserver added in v0.7.6

func StopObserver()

StopObserver unblocks signal

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, msgPath, logPath, logFilter string, limit uint32) *Feeder

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
	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