entries

package
v1.65.0 Latest Latest
Warning

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

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

Documentation

Overview

Package entries provides an interface to work with Entries

Index

Constants

View Source
const MaxDuration = time.Minute * 2

MaxDuration is the age past which a debug entry is considered stale.

View Source
const MaxItems = 200

MaxItems is the maximum number of debug entries cached

Variables

This section is empty.

Functions

This section is empty.

Types

type Entries

type Entries struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Entries holds a limited size buffer of formatted debug entries

func New

func New() *Entries

New returns a new collection of log entries

func (*Entries) Append

func (e *Entries) Append(message string)

func (*Entries) Flush

func (e *Entries) Flush(write func(s string))

func (*Entries) Purge

func (e *Entries) Purge()

Jump to

Keyboard shortcuts

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