pools

package
v0.15.0-rc.10 Latest Latest
Warning

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

Go to latest
Published: May 15, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildIteratorPools

func BuildIteratorPools(
	opts BuildIteratorPoolsOptions,
) encoding.IteratorPools

BuildIteratorPools build iterator pools if they are unavailable from m3db (e.g. if running standalone query)

func BuildWorkerPools

func BuildWorkerPools(
	instrumentOptions instrument.Options,
	readPoolPolicy, writePoolPolicy xconfig.WorkerPoolPolicy,
	scope tally.Scope,
) (xsync.PooledWorkerPool, xsync.PooledWorkerPool, error)

BuildWorkerPools builds a worker pool

Types

type BuildIteratorPoolsOptions

type BuildIteratorPoolsOptions struct {
	Replicas                    int
	SeriesIteratorPoolSize      int
	SeriesIteratorsPoolBuckets  []pool.Bucket
	SeriesIDBytesPoolBuckets    []pool.Bucket
	CheckedBytesWrapperPoolSize int
}

BuildIteratorPoolsOptions is a set of build iterator pools.

func (BuildIteratorPoolsOptions) CheckedBytesWrapperPoolSizeOrDefault

func (o BuildIteratorPoolsOptions) CheckedBytesWrapperPoolSizeOrDefault() int

CheckedBytesWrapperPoolSizeOrDefault returns the checked bytes wrapper pool size or default.

func (BuildIteratorPoolsOptions) ReplicasOrDefault

func (o BuildIteratorPoolsOptions) ReplicasOrDefault() int

ReplicasOrDefault returns the replicas or default.

func (BuildIteratorPoolsOptions) SeriesIDBytesPoolBucketsOrDefault

func (o BuildIteratorPoolsOptions) SeriesIDBytesPoolBucketsOrDefault() []pool.Bucket

SeriesIDBytesPoolBucketsOrDefault returns the bytes pool buckets or defaults.

func (BuildIteratorPoolsOptions) SeriesIteratorPoolSizeOrDefault

func (o BuildIteratorPoolsOptions) SeriesIteratorPoolSizeOrDefault() int

SeriesIteratorPoolSizeOrDefault returns the replicas or default.

func (BuildIteratorPoolsOptions) SeriesIteratorsPoolBucketsOrDefault

func (o BuildIteratorPoolsOptions) SeriesIteratorsPoolBucketsOrDefault() []pool.Bucket

SeriesIteratorsPoolBucketsOrDefault returns the series iterator pool buckets or defaults.

type PoolWrapper

type PoolWrapper struct {
	// contains filtered or unexported fields
}

PoolWrapper is an asynchronous wrapper for iterator pools.

func NewAsyncPoolsWrapper

func NewAsyncPoolsWrapper() *PoolWrapper

NewAsyncPoolsWrapper creates a pool wrapper which must be initialized.

func NewPoolsWrapper

func NewPoolsWrapper(pools encoding.IteratorPools) *PoolWrapper

NewPoolsWrapper creates an initialized pool wrapper.

func (*PoolWrapper) Init

func (w *PoolWrapper) Init(
	sessionPools encoding.IteratorPools,
	err error,
)

Init initializes the wrapper with iterator pools and notifies any watchers.

func (*PoolWrapper) IteratorPools

func (w *PoolWrapper) IteratorPools() (
	bool, encoding.IteratorPools, error, <-chan encoding.IteratorPools, <-chan error)

IteratorPools either returns iterator pools and errors, or channels that will be notified when iterator pools become available.

func (*PoolWrapper) WaitForIteratorPools added in v0.4.8

func (w *PoolWrapper) WaitForIteratorPools(
	timeout time.Duration,
) (encoding.IteratorPools, error)

WaitForIteratorPools will block until iterator pools are available. If given a timeout of 0, will block indefinitely.

Jump to

Keyboard shortcuts

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