tchannelthrift

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2019 License: Apache-2.0 Imports: 13 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 {
	// SetClockOptions sets the clock options.
	SetClockOptions(value clock.Options) Options

	// ClockOptions returns the clock options.
	ClockOptions() clock.Options

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

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

	// SetTopologyInitializer sets the TopologyInitializer.
	SetTopologyInitializer(value topology.Initializer) Options

	// TopologyInitializer returns the TopologyInitializer.
	TopologyInitializer() topology.Initializer

	// SetIdentifierPool sets the identifier pool.
	SetIdentifierPool(value ident.Pool) Options

	// IdentifierPool returns the identifier pool.
	IdentifierPool() ident.Pool

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

	// SetMaxOutstandingWriteRequests sets the maximum number of allowed
	// outstanding write requests.
	SetMaxOutstandingWriteRequests(value int) Options

	// MaxOutstandingWriteRequests returns the maxinum number of allowed
	// outstanding write requests.
	MaxOutstandingWriteRequests() int

	// SetMaxOutstandingReadRequests sets the maximum number of allowed
	// outstanding read requests.
	SetMaxOutstandingReadRequests(value int) Options

	// MaxOutstandingReadRequests returns the maxinum number of allowed
	// outstanding read requests.
	MaxOutstandingReadRequests() int
}

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