tchannelthrift

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2019 License: Apache-2.0 Imports: 10 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Context

func Context(ctx thrift.Context) context.Context

Context returns an M3DB context from the thrift context

func NewContext

func NewContext(timeout time.Duration) (thrift.Context, xnetcontext.CancelFunc)

NewContext returns a new thrift context and cancel func with embedded M3DB context

func RegisterServer

func RegisterServer(channel *tchannel.Channel, service thrift.TChanServer, contextPool context.Pool)

RegisterServer will register a tchannel thrift server and create and close M3DB contexts per request

Types

type BlockMetadataV2Pool

type BlockMetadataV2Pool interface {
	// Get returns a block metadata
	Get() *rpc.BlockMetadataV2

	// Put puts a block metadata back to pool
	Put(m *rpc.BlockMetadataV2)
}

BlockMetadataV2Pool provides a pool for block metadata

func NewBlockMetadataV2Pool

func NewBlockMetadataV2Pool(opts pool.ObjectPoolOptions) BlockMetadataV2Pool

NewBlockMetadataV2Pool creates a new block metadata pool

type BlockMetadataV2SlicePool

type BlockMetadataV2SlicePool interface {
	// Get returns a block metadata slice
	Get() []*rpc.BlockMetadataV2

	// Put puts a block metadata slice back to pool
	Put(m []*rpc.BlockMetadataV2)
}

BlockMetadataV2SlicePool provides a pool for block metadata slices

func NewBlockMetadataV2SlicePool

func NewBlockMetadataV2SlicePool(opts pool.ObjectPoolOptions, capacity int) BlockMetadataV2SlicePool

NewBlockMetadataV2SlicePool creates a new blockMetadataV2Slice pool

type Options

type Options interface {
	// SetInstrumentOptions sets the instrumentation options
	SetInstrumentOptions(value instrument.Options) Options

	// InstrumentOptions returns the instrumentation options
	InstrumentOptions() instrument.Options

	// SetBlockMetadataV2Pool sets the block metadata pool
	SetBlockMetadataV2Pool(value BlockMetadataV2Pool) Options

	// BlockMetadataV2Pool returns the block metadata pool
	BlockMetadataV2Pool() BlockMetadataV2Pool

	// SetBlockMetadataV2SlicePool sets the block metadata slice pool
	SetBlockMetadataV2SlicePool(value BlockMetadataV2SlicePool) Options

	// BlockMetadataV2SlicePool returns the block metadata slice pool
	BlockMetadataV2SlicePool() BlockMetadataV2SlicePool

	// SetTagEncoderPool sets the tag encoder pool.
	SetTagEncoderPool(value serialize.TagEncoderPool) Options

	// TagEncoderPool returns the tag encoder pool
	TagEncoderPool() serialize.TagEncoderPool

	// SetTagDecoderPool sets the tag encoder pool.
	SetTagDecoderPool(value serialize.TagDecoderPool) Options

	// TagDecoderPool returns the tag encoder pool
	TagDecoderPool() serialize.TagDecoderPool
}

Options controls server behavior

func NewOptions

func NewOptions() Options

NewOptions creates new options

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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