logbuffer

package
v0.43.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

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

func NewBuffer

func NewBuffer(maxMessageCount int, maxBufferSize int64) *Buffer

func (*Buffer) AddEntry added in v0.40.0

func (b *Buffer) AddEntry(lvl runtimev1.LogLevel, t time.Time, msg, payload string) error

func (*Buffer) GetLogs

func (b *Buffer) GetLogs(asc bool, limit int, minLvl runtimev1.LogLevel) []*runtimev1.Log

func (*Buffer) WatchLogs

func (b *Buffer) WatchLogs(ctx context.Context, fn LogCallback, minLvl runtimev1.LogLevel) error

type LogCallback

type LogCallback func(item *runtimev1.Log)

Jump to

Keyboard shortcuts

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