internal

package
v0.0.2-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: ISC Imports: 14 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DumpRequest

func DumpRequest(r *http.Request) string

Credit: github.com/gin-gonic/gin/recovery.go

func DumpStack

func DumpStack() string

Credit: github.com/gin-gonic/gin/recovery.go

Types

type DocumentReader

type DocumentReader struct {
	Line uint
	// contains filtered or unexported fields
}

func NewDocumentReader

func NewDocumentReader(parent *DocumentReader, file w3utils.FileLike) *DocumentReader

func (*DocumentReader) Filename

func (reader *DocumentReader) Filename() string

func (*DocumentReader) Here

func (reader *DocumentReader) Here() uint

func (*DocumentReader) HideArrow

func (reader *DocumentReader) HideArrow()

func (*DocumentReader) HighlightSince

func (reader *DocumentReader) HighlightSince(head uint)

func (*DocumentReader) Origin

func (reader *DocumentReader) Origin() *DocumentReader

func (*DocumentReader) Read

func (reader *DocumentReader) Read() (rune, error)

func (*DocumentReader) Unread

func (reader *DocumentReader) Unread()

func (*DocumentReader) WrapError

func (reader *DocumentReader) WrapError(err error) w3errs.DocumentError

type Pool

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

Pool is a fixed-size object pool with a dense stack free-list. Refer to NewPool.

func NewPool

func NewPool[T any](n uint16, factory func() T) *Pool[T]

Create a new Pool with specified size and object factory.

func (*Pool[T]) Acquire

func (pool *Pool[T]) Acquire() (index uint16)

Acquire an index to an available object. Waits when no object is available.

func (*Pool[T]) AcquireObject

func (pool *Pool[T]) AcquireObject() (index uint16, object *T)

AcquireObject is sugar code for calling Pool.Acquire and Pool.Get.

func (*Pool[T]) Get

func (pool *Pool[T]) Get(index uint16) *T

Get the reference to an object. Not to be mistaken with Pool.Acquire.

func (*Pool[T]) Release

func (pool *Pool[T]) Release(index uint16)

Release an object back into the pool.

type RingBuffer1024

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

A ring buffer with fixed capacity of 1024 elements. Refer to [NewRingBuffer].

func NewRingBuffer1024

func NewRingBuffer1024[T any]() *RingBuffer1024[T]

func (*RingBuffer1024[T]) Dump

func (buffer *RingBuffer1024[T]) Dump() []T

func (*RingBuffer1024[T]) Push

func (buffer *RingBuffer1024[T]) Push(value T)

Jump to

Keyboard shortcuts

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