log

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogEntry

type LogEntry struct {
	Timestamp   time.Time
	Level       string
	Message     string
	Context     map[string]interface{}
	StackTrace  string
	ProcessedAt time.Time
}

LogEntry represents a processed log entry

type LogStream

type LogStream struct {
	NodeID       string
	LogLevel     string
	OutputFormat string
	Buffer       []LogEntry
	LastActivity time.Time
	IsActive     bool
}

LogStream represents an active log processing stream

type Processor

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

Processor implements the LogProcessingService interface

func NewProcessor

func NewProcessor() *Processor

NewProcessor creates a new instance of the log processor

func (*Processor) Cleanup

func (p *Processor) Cleanup(ctx context.Context, nodeID string) error

Cleanup removes a log processing stream and its resources

func (*Processor) ClearProcessedLogs

func (p *Processor) ClearProcessedLogs(ctx context.Context, nodeID string) error

ClearProcessedLogs clears processed log entries for a node

func (*Processor) CreateStream

func (p *Processor) CreateStream(ctx context.Context, nodeID string) error

CreateStream creates a new log processing stream for a node

func (*Processor) GetProcessedLogs

func (p *Processor) GetProcessedLogs(ctx context.Context, nodeID string) ([]LogEntry, error)

GetProcessedLogs retrieves processed log entries for a node

func (*Processor) Initialize

func (p *Processor) Initialize(ctx context.Context, config hephaestus.LoggingConfiguration) error

Initialize sets up the log processor with the provided configuration

func (*Processor) ProcessLogs

func (p *Processor) ProcessLogs(ctx context.Context, nodeID string, logs []string) error

ProcessLogs processes a batch of log entries for a node

Jump to

Keyboard shortcuts

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