misc

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package misc provides miscellaneous data types and functions for better processing of log entries.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Queue

type Queue[T any] struct {
	// contains filtered or unexported fields
}

Queue is an implementation of the list data structure, it is a FIFO (first in, first out) data structure over a slice.

func NewQueue

func NewQueue[T any](capacity int) *Queue[T]

NewQueue returns a new Queue.

func (*Queue[T]) Len

func (q *Queue[T]) Len() int

Len returns the length of the queue.

func (*Queue[T]) PopFront

func (q *Queue[T]) PopFront() T

PopFront removes the first element from the queue and returns it.

func (*Queue[T]) PushBack

func (q *Queue[T]) PushBack(e T)

PushBack adds an element to the end of the queue.

Jump to

Keyboard shortcuts

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