tchannelthrift

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2018 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 BlockMetadataPool

type BlockMetadataPool interface {
	// Get returns a block metadata
	Get() *rpc.BlockMetadata

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

BlockMetadataPool provides a pool for block metadata

func NewBlockMetadataPool

func NewBlockMetadataPool(opts pool.ObjectPoolOptions) BlockMetadataPool

NewBlockMetadataPool creates a new block metadata pool

type BlockMetadataSlicePool

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

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

BlockMetadataSlicePool provides a pool for block metadata slices

func NewBlockMetadataSlicePool

func NewBlockMetadataSlicePool(opts pool.ObjectPoolOptions, capacity int) BlockMetadataSlicePool

NewBlockMetadataSlicePool creates a new blockMetadataSlice pool

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 BlocksMetadataPool

type BlocksMetadataPool interface {
	// Get returns a blocks metadata
	Get() *rpc.BlocksMetadata

	// Put puts a blocks metadata back to pool
	Put(m *rpc.BlocksMetadata)
}

BlocksMetadataPool provides a pool for blocks metadata

func NewBlocksMetadataPool

func NewBlocksMetadataPool(opts pool.ObjectPoolOptions) BlocksMetadataPool

NewBlocksMetadataPool creates a new blocks metadata pool

type BlocksMetadataSlicePool

type BlocksMetadataSlicePool interface {
	// Get returns a blocks metadata slice
	Get() []*rpc.BlocksMetadata

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

BlocksMetadataSlicePool provides a pool for blocks metadata slices

func NewBlocksMetadataSlicePool

func NewBlocksMetadataSlicePool(opts pool.ObjectPoolOptions, capacity int) BlocksMetadataSlicePool

NewBlocksMetadataSlicePool creates a new blocksMetadataSlice pool

type Options

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

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

	// SetBlockMetadataPool sets the block metadata pool
	SetBlockMetadataPool(value BlockMetadataPool) Options

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

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

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

	// SetBlockMetadataSlicePool sets the block metadata slice pool
	SetBlockMetadataSlicePool(value BlockMetadataSlicePool) Options

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

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

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

	// SetBlocksMetadataPool sets the blocks metadata pool
	SetBlocksMetadataPool(value BlocksMetadataPool) Options

	// BlocksMetadataPool returns the blocks metadata pool
	BlocksMetadataPool() BlocksMetadataPool

	// SetBlocksMetadataSlicePool sets the blocks metadata slice pool
	SetBlocksMetadataSlicePool(value BlocksMetadataSlicePool) Options

	// BlocksMetadataSlicePool returns the blocks metadata slice pool
	BlocksMetadataSlicePool() BlocksMetadataSlicePool

	// 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