ring_buffer

package
v0.0.0-...-06ab379 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageBuffer

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

func NewMessageBuffer

func NewMessageBuffer(n int) *MessageBuffer

func (*MessageBuffer) AddCell

func (mb *MessageBuffer) AddCell(r *RingCell)

func (*MessageBuffer) EraseCell

func (mb *MessageBuffer) EraseCell(r *ring.Ring)

func (*MessageBuffer) GetCell

func (mb *MessageBuffer) GetCell(compare func(a, b *RingCell) bool, dir func() *ring.Ring) (*RingCell, *ring.Ring, bool)

func (*MessageBuffer) GetNewestCell

func (mb *MessageBuffer) GetNewestCell() (*RingCell, *ring.Ring, bool)

func (*MessageBuffer) GetOldestCell

func (mb *MessageBuffer) GetOldestCell() (*RingCell, *ring.Ring, bool)

type RingCell

type RingCell struct {
	LogParams types.LogParams
	Message   string
	// contains filtered or unexported fields
}

func NewCell

func NewCell(lp types.LogParams, m string) *RingCell

Jump to

Keyboard shortcuts

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