xpool

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2022 License: Apache-2.0 Imports: 2 Imported by: 19

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckedBytesWrapperPool

type CheckedBytesWrapperPool interface {
	Init()

	Get([]byte) checked.Bytes
}

CheckedBytesWrapperPool allows users to wrap []byte which have been allocated by other libraries (e.g. thrift/t-channel) with a checked.Bytes abstraction. This is to ensure we reference count usage, and more importantly, can interop with the rest of the M3DB codebase (which requires checked.Bytes). NB: This pool doesn't require a Put method, as Finalizing the bytes returned from Get does the Put internally.

func NewCheckedBytesWrapperPool

func NewCheckedBytesWrapperPool(popts pool.ObjectPoolOptions) CheckedBytesWrapperPool

NewCheckedBytesWrapperPool returns a new CheckedBytesWrapperPool with the defined size.

Jump to

Keyboard shortcuts

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