log

package
v0.0.0-...-a8fcf23 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2022 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package log provides utils to implement logging.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry interface{}

Single log entry.

type Log

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

Bounded log that evicts old entries.

func New

func New(size int) *Log

func (*Log) Add

func (l *Log) Add(e Entry)

Adds a new entry to the log, potentially evicting existing entries.

func (*Log) Do

func (l *Log) Do(f func(Entry))

Jump to

Keyboard shortcuts

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