collection

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Array

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

Array is used to prepopulate an array of items which can be re-used to add to log messages.

func Arr

func Arr() *Array

Arr creates an array to be added to an Event or Context.

func (*Array) MarshalZerologArray

func (*Array) MarshalZerologArray(*Array)

MarshalZerologArray method here is no-op - since data is already in the needed format.

type BufferPool

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

BufferPool represents a thread safe buffer pool

func NewBufferPool

func NewBufferPool() (bp *BufferPool)

NewBufferPool creates a new BufferPool bounded to the given size.

func (*BufferPool) Get

func (pool *BufferPool) Get() (buffer *bytes.Buffer)

Get gets a Buffer from the SizedBufferPool, or creates a new one if none are available in the pool. Buffers have a pre-allocated capacity.

func (*BufferPool) Put

func (pool *BufferPool) Put(buffer *bytes.Buffer)

Put returns the given Buffer to the SizedBufferPool.

type Payload

type Payload []byte

Jump to

Keyboard shortcuts

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