dbreader

package
v0.0.0-...-525e0eb Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DbReader

type DbReader interface {
	ParseServiceLogDB()
}

type ServiceLog

type ServiceLog struct {
	ID          int    `json:"Id"`
	Description string `json:"Description"`
	Severity    uint8  `json:"Severity"`
}

ServiceLog is a template to retrieve relevant fields from the servicelog.db. This can further be extended to retrieve other fields that are available in the servicelog DB.

type ServiceLogParser

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

ServicelogParser implements the DBReader interface.

func NewReader

func NewReader(dbFilePath string, eventSeverity int) *ServiceLogParser

NewReader creates an instance of ServerLogParser.

func (*ServiceLogParser) ParseServiceLogDB

func (parser *ServiceLogParser) ParseServiceLogDB(notifier *knode.Notifier) error

ParseServiceLogDB accesses the servicelog.db and retrieves the rows based on the severity threshold configured. The retrieved entries are logged and published as an event to the Kubernetes API server.

Jump to

Keyboard shortcuts

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