logbuffer

package
v0.37.3 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2023 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) Add

func (b *Buffer) Add(record slog.Record) error

func (*Buffer) GetLogs

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

func (*Buffer) WatchLogs

func (b *Buffer) WatchLogs(ctx context.Context, fn LogCallback) 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