ringlog

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RingLog

type RingLog struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

RingLog is a capped logger with fixed size

func New

func New(size int) *RingLog

New creates new Ring logger

func (*RingLog) Insert

func (r *RingLog) Insert(obj interface{})

Insert inserts new entry into the ring logger

func (*RingLog) Walk

func (r *RingLog) Walk() []interface{}

Walk dumps all the entries from the Ring logger

type RingLogger

type RingLogger interface {
	Insert(interface{})
	Walk() []interface{}
}

RingLogger describes ring logger methods

Jump to

Keyboard shortcuts

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