thrift

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package thrift code has been copied from https://github.com/m3dbx/thrift branch 0.9.3-patch This provides support for multiple byte slice pools of different capacities. see:https://github.com/m3dbx/thrift/blob/0.9.3-patch/lib/go/thrift/binary_protocol.go#L40

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesPoolGet

func BytesPoolGet(size int) []byte

BytesPoolGet returns a pooled byte slice of capacity BytesPoolAlloc.

func BytesPoolPut

func BytesPoolPut(b []byte) bool

BytesPoolPut is a public func to call to return pooled bytes to, each the capacity of BytesPoolAlloc. TBinaryProtocol.ReadBinary uses this pool to allocate from if the size of the bytes required to return is is equal or less than BytesPoolAlloc.

func SetMaxBytesPoolAlloc

func SetMaxBytesPoolAlloc(capacities ...int)

SetMaxBytesPoolAlloc sets the capacities of byte slices that are pooled for binary thrift fields and must be called before any thrift binary protocols are used since it is a global and is not thread safe to edit.

Types

This section is empty.

Jump to

Keyboard shortcuts

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