Documentation ¶
Index ¶
- type BoolArrayBucket
- type BoolArrayBucketConfiguration
- type BoolArrayPool
- type BoolArrayPoolConfiguration
- type BoolArrayPoolOptions
- func (o *BoolArrayPoolOptions) InstrumentOptions() instrument.Options
- func (o *BoolArrayPoolOptions) RefillHighWatermark() float64
- func (o *BoolArrayPoolOptions) RefillLowWatermark() float64
- func (o *BoolArrayPoolOptions) SetInstrumentOptions(v instrument.Options) *BoolArrayPoolOptions
- func (o *BoolArrayPoolOptions) SetRefillHighWatermark(v float64) *BoolArrayPoolOptions
- func (o *BoolArrayPoolOptions) SetRefillLowWatermark(v float64) *BoolArrayPoolOptions
- func (o *BoolArrayPoolOptions) SetSize(v int) *BoolArrayPoolOptions
- func (o *BoolArrayPoolOptions) Size() int
- type BoolArrayPoolWatermarkConfiguration
- type BucketizedBoolArrayPool
- type BucketizedBoolArrayPoolConfiguration
- type BucketizedBytesArrayPool
- type BucketizedBytesArrayPoolConfiguration
- type BucketizedFloat64ArrayPool
- type BucketizedFloat64ArrayPoolConfiguration
- type BucketizedInt64ArrayPool
- type BucketizedInt64ArrayPoolConfiguration
- type BucketizedIntArrayPool
- type BucketizedIntArrayPoolConfiguration
- type BytesArrayBucket
- type BytesArrayBucketConfiguration
- type BytesArrayPool
- type BytesArrayPoolConfiguration
- type BytesArrayPoolOptions
- func (o *BytesArrayPoolOptions) InstrumentOptions() instrument.Options
- func (o *BytesArrayPoolOptions) RefillHighWatermark() float64
- func (o *BytesArrayPoolOptions) RefillLowWatermark() float64
- func (o *BytesArrayPoolOptions) SetInstrumentOptions(v instrument.Options) *BytesArrayPoolOptions
- func (o *BytesArrayPoolOptions) SetRefillHighWatermark(v float64) *BytesArrayPoolOptions
- func (o *BytesArrayPoolOptions) SetRefillLowWatermark(v float64) *BytesArrayPoolOptions
- func (o *BytesArrayPoolOptions) SetSize(v int) *BytesArrayPoolOptions
- func (o *BytesArrayPoolOptions) Size() int
- type BytesArrayPoolWatermarkConfiguration
- type Float64ArrayBucket
- type Float64ArrayBucketConfiguration
- type Float64ArrayPool
- type Float64ArrayPoolConfiguration
- type Float64ArrayPoolOptions
- func (o *Float64ArrayPoolOptions) InstrumentOptions() instrument.Options
- func (o *Float64ArrayPoolOptions) RefillHighWatermark() float64
- func (o *Float64ArrayPoolOptions) RefillLowWatermark() float64
- func (o *Float64ArrayPoolOptions) SetInstrumentOptions(v instrument.Options) *Float64ArrayPoolOptions
- func (o *Float64ArrayPoolOptions) SetRefillHighWatermark(v float64) *Float64ArrayPoolOptions
- func (o *Float64ArrayPoolOptions) SetRefillLowWatermark(v float64) *Float64ArrayPoolOptions
- func (o *Float64ArrayPoolOptions) SetSize(v int) *Float64ArrayPoolOptions
- func (o *Float64ArrayPoolOptions) Size() int
- type Float64ArrayPoolWatermarkConfiguration
- type Int64ArrayBucket
- type Int64ArrayBucketConfiguration
- type Int64ArrayPool
- type Int64ArrayPoolConfiguration
- type Int64ArrayPoolOptions
- func (o *Int64ArrayPoolOptions) InstrumentOptions() instrument.Options
- func (o *Int64ArrayPoolOptions) RefillHighWatermark() float64
- func (o *Int64ArrayPoolOptions) RefillLowWatermark() float64
- func (o *Int64ArrayPoolOptions) SetInstrumentOptions(v instrument.Options) *Int64ArrayPoolOptions
- func (o *Int64ArrayPoolOptions) SetRefillHighWatermark(v float64) *Int64ArrayPoolOptions
- func (o *Int64ArrayPoolOptions) SetRefillLowWatermark(v float64) *Int64ArrayPoolOptions
- func (o *Int64ArrayPoolOptions) SetSize(v int) *Int64ArrayPoolOptions
- func (o *Int64ArrayPoolOptions) Size() int
- type Int64ArrayPoolWatermarkConfiguration
- type IntArrayBucket
- type IntArrayBucketConfiguration
- type IntArrayPool
- type IntArrayPoolConfiguration
- type IntArrayPoolOptions
- func (o *IntArrayPoolOptions) InstrumentOptions() instrument.Options
- func (o *IntArrayPoolOptions) RefillHighWatermark() float64
- func (o *IntArrayPoolOptions) RefillLowWatermark() float64
- func (o *IntArrayPoolOptions) SetInstrumentOptions(v instrument.Options) *IntArrayPoolOptions
- func (o *IntArrayPoolOptions) SetRefillHighWatermark(v float64) *IntArrayPoolOptions
- func (o *IntArrayPoolOptions) SetRefillLowWatermark(v float64) *IntArrayPoolOptions
- func (o *IntArrayPoolOptions) SetSize(v int) *IntArrayPoolOptions
- func (o *IntArrayPoolOptions) Size() int
- type IntArrayPoolWatermarkConfiguration
- type RefCountedPooledBoolArray
- type RefCountedPooledBytesArray
- type RefCountedPooledFloat64Array
- type RefCountedPooledInt64Array
- type RefCountedPooledIntArray
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BoolArrayBucket ¶
type BoolArrayBucket struct { // Capacity is the size of each element in the bucket. Capacity int // Count is the number of fixed elements in the bucket. Count int // Options is an optional override to specify options to use for a bucket, // specify nil to use the options specified to the bucketized pool // constructor for this bucket. Options *BoolArrayPoolOptions }
BoolArrayBucket specifies a bucket.
type BoolArrayBucketConfiguration ¶
type BoolArrayBucketConfiguration struct { // The count of the items in the bucket. Count int `yaml:"count"` // The capacity of each item in the bucket. Capacity int `yaml:"capacity"` }
BoolArrayBucketConfiguration contains configuration for a pool bucket.
func (*BoolArrayBucketConfiguration) NewBucket ¶
func (c *BoolArrayBucketConfiguration) NewBucket() BoolArrayBucket
NewBucket creates a new bucket.
type BoolArrayPool ¶
type BoolArrayPool struct {
// contains filtered or unexported fields
}
BoolArrayPool is a value pool.
func NewBoolArrayPool ¶
func NewBoolArrayPool(opts *BoolArrayPoolOptions) *BoolArrayPool
NewBoolArrayPool creates a new pool.
func (*BoolArrayPool) Init ¶
func (p *BoolArrayPool) Init(alloc func() []bool)
Init initializes the pool.
type BoolArrayPoolConfiguration ¶
type BoolArrayPoolConfiguration struct { // The size of the pool. Size *int `yaml:"size"` // The watermark configuration. Watermark BoolArrayPoolWatermarkConfiguration `yaml:"watermark"` }
BoolArrayPoolConfiguration contains pool configuration.
func (*BoolArrayPoolConfiguration) NewPoolOptions ¶
func (c *BoolArrayPoolConfiguration) NewPoolOptions( instrumentOpts instrument.Options, ) *BoolArrayPoolOptions
NewPoolOptions creates a new set of pool options.
type BoolArrayPoolOptions ¶
type BoolArrayPoolOptions struct {
// contains filtered or unexported fields
}
BoolArrayPoolOptions provide a set of options for the value pool.
func NewBoolArrayPoolOptions ¶
func NewBoolArrayPoolOptions() *BoolArrayPoolOptions
NewBoolArrayPoolOptions create a new set of value pool options.
func (*BoolArrayPoolOptions) InstrumentOptions ¶
func (o *BoolArrayPoolOptions) InstrumentOptions() instrument.Options
InstrumentOptions returns the instrument options.
func (*BoolArrayPoolOptions) RefillHighWatermark ¶
func (o *BoolArrayPoolOptions) RefillHighWatermark() float64
RefillHighWatermark returns the high watermark for stop refilling the pool.
func (*BoolArrayPoolOptions) RefillLowWatermark ¶
func (o *BoolArrayPoolOptions) RefillLowWatermark() float64
RefillLowWatermark returns the low watermark for refilling the pool.
func (*BoolArrayPoolOptions) SetInstrumentOptions ¶
func (o *BoolArrayPoolOptions) SetInstrumentOptions(v instrument.Options) *BoolArrayPoolOptions
SetInstrumentOptions sets the instrument options.
func (*BoolArrayPoolOptions) SetRefillHighWatermark ¶
func (o *BoolArrayPoolOptions) SetRefillHighWatermark(v float64) *BoolArrayPoolOptions
SetRefillHighWatermark sets the high watermark for refilling the pool.
func (*BoolArrayPoolOptions) SetRefillLowWatermark ¶
func (o *BoolArrayPoolOptions) SetRefillLowWatermark(v float64) *BoolArrayPoolOptions
SetRefillLowWatermark sets the low watermark for refilling the pool.
func (*BoolArrayPoolOptions) SetSize ¶
func (o *BoolArrayPoolOptions) SetSize(v int) *BoolArrayPoolOptions
SetSize sets the pool size.
func (*BoolArrayPoolOptions) Size ¶
func (o *BoolArrayPoolOptions) Size() int
Size returns pool size.
type BoolArrayPoolWatermarkConfiguration ¶
type BoolArrayPoolWatermarkConfiguration struct { // The low watermark to start refilling the pool, if zero none. RefillLowWatermark float64 `yaml:"low" validate:"min=0.0,max=1.0"` // The high watermark to stop refilling the pool, if zero none. RefillHighWatermark float64 `yaml:"high" validate:"min=0.0,max=1.0"` }
BoolArrayPoolWatermarkConfiguration contains watermark configuration for pools.
type BucketizedBoolArrayPool ¶
type BucketizedBoolArrayPool struct {
// contains filtered or unexported fields
}
BucketizedBoolArrayPool is a bucketized value pool.
func NewBucketizedBoolArrayPool ¶
func NewBucketizedBoolArrayPool(sizes []BoolArrayBucket, opts *BoolArrayPoolOptions) *BucketizedBoolArrayPool
NewBucketizedBoolArrayPool creates a bucketized object pool.
func (*BucketizedBoolArrayPool) Get ¶
func (p *BucketizedBoolArrayPool) Get(capacity int) []bool
Get gets a value from the pool.
func (*BucketizedBoolArrayPool) Init ¶
func (p *BucketizedBoolArrayPool) Init(alloc func(capacity int) []bool)
Init initializes the bucketized pool.
func (*BucketizedBoolArrayPool) Put ¶
func (p *BucketizedBoolArrayPool) Put(v []bool, capacity int)
Put puts a value to the pool.
type BucketizedBoolArrayPoolConfiguration ¶
type BucketizedBoolArrayPoolConfiguration struct { // The pool bucket configuration. Buckets []BoolArrayBucketConfiguration `yaml:"buckets"` // The watermark configuration. Watermark BoolArrayPoolWatermarkConfiguration `yaml:"watermark"` }
BucketizedBoolArrayPoolConfiguration contains configuration for bucketized pools.
func (*BucketizedBoolArrayPoolConfiguration) NewBuckets ¶
func (c *BucketizedBoolArrayPoolConfiguration) NewBuckets() []BoolArrayBucket
NewBuckets create a new list of buckets.
func (*BucketizedBoolArrayPoolConfiguration) NewPoolOptions ¶
func (c *BucketizedBoolArrayPoolConfiguration) NewPoolOptions( instrumentOptions instrument.Options, ) *BoolArrayPoolOptions
NewPoolOptions creates a new set of pool options.
type BucketizedBytesArrayPool ¶
type BucketizedBytesArrayPool struct {
// contains filtered or unexported fields
}
BucketizedBytesArrayPool is a bucketized value pool.
func NewBucketizedBytesArrayPool ¶
func NewBucketizedBytesArrayPool(sizes []BytesArrayBucket, opts *BytesArrayPoolOptions) *BucketizedBytesArrayPool
NewBucketizedBytesArrayPool creates a bucketized object pool.
func (*BucketizedBytesArrayPool) Get ¶
func (p *BucketizedBytesArrayPool) Get(capacity int) [][]byte
Get gets a value from the pool.
func (*BucketizedBytesArrayPool) Init ¶
func (p *BucketizedBytesArrayPool) Init(alloc func(capacity int) [][]byte)
Init initializes the bucketized pool.
func (*BucketizedBytesArrayPool) Put ¶
func (p *BucketizedBytesArrayPool) Put(v [][]byte, capacity int)
Put puts a value to the pool.
type BucketizedBytesArrayPoolConfiguration ¶
type BucketizedBytesArrayPoolConfiguration struct { // The pool bucket configuration. Buckets []BytesArrayBucketConfiguration `yaml:"buckets"` // The watermark configuration. Watermark BytesArrayPoolWatermarkConfiguration `yaml:"watermark"` }
BucketizedBytesArrayPoolConfiguration contains configuration for bucketized pools.
func (*BucketizedBytesArrayPoolConfiguration) NewBuckets ¶
func (c *BucketizedBytesArrayPoolConfiguration) NewBuckets() []BytesArrayBucket
NewBuckets create a new list of buckets.
func (*BucketizedBytesArrayPoolConfiguration) NewPoolOptions ¶
func (c *BucketizedBytesArrayPoolConfiguration) NewPoolOptions( instrumentOptions instrument.Options, ) *BytesArrayPoolOptions
NewPoolOptions creates a new set of pool options.
type BucketizedFloat64ArrayPool ¶
type BucketizedFloat64ArrayPool struct {
// contains filtered or unexported fields
}
BucketizedFloat64ArrayPool is a bucketized value pool.
func NewBucketizedFloat64ArrayPool ¶
func NewBucketizedFloat64ArrayPool(sizes []Float64ArrayBucket, opts *Float64ArrayPoolOptions) *BucketizedFloat64ArrayPool
NewBucketizedFloat64ArrayPool creates a bucketized object pool.
func (*BucketizedFloat64ArrayPool) Get ¶
func (p *BucketizedFloat64ArrayPool) Get(capacity int) []float64
Get gets a value from the pool.
func (*BucketizedFloat64ArrayPool) Init ¶
func (p *BucketizedFloat64ArrayPool) Init(alloc func(capacity int) []float64)
Init initializes the bucketized pool.
func (*BucketizedFloat64ArrayPool) Put ¶
func (p *BucketizedFloat64ArrayPool) Put(v []float64, capacity int)
Put puts a value to the pool.
type BucketizedFloat64ArrayPoolConfiguration ¶
type BucketizedFloat64ArrayPoolConfiguration struct { // The pool bucket configuration. Buckets []Float64ArrayBucketConfiguration `yaml:"buckets"` // The watermark configuration. Watermark Float64ArrayPoolWatermarkConfiguration `yaml:"watermark"` }
BucketizedFloat64ArrayPoolConfiguration contains configuration for bucketized pools.
func (*BucketizedFloat64ArrayPoolConfiguration) NewBuckets ¶
func (c *BucketizedFloat64ArrayPoolConfiguration) NewBuckets() []Float64ArrayBucket
NewBuckets create a new list of buckets.
func (*BucketizedFloat64ArrayPoolConfiguration) NewPoolOptions ¶
func (c *BucketizedFloat64ArrayPoolConfiguration) NewPoolOptions( instrumentOptions instrument.Options, ) *Float64ArrayPoolOptions
NewPoolOptions creates a new set of pool options.
type BucketizedInt64ArrayPool ¶
type BucketizedInt64ArrayPool struct {
// contains filtered or unexported fields
}
BucketizedInt64ArrayPool is a bucketized value pool.
func NewBucketizedInt64ArrayPool ¶
func NewBucketizedInt64ArrayPool(sizes []Int64ArrayBucket, opts *Int64ArrayPoolOptions) *BucketizedInt64ArrayPool
NewBucketizedInt64ArrayPool creates a bucketized object pool.
func (*BucketizedInt64ArrayPool) Get ¶
func (p *BucketizedInt64ArrayPool) Get(capacity int) []int64
Get gets a value from the pool.
func (*BucketizedInt64ArrayPool) Init ¶
func (p *BucketizedInt64ArrayPool) Init(alloc func(capacity int) []int64)
Init initializes the bucketized pool.
func (*BucketizedInt64ArrayPool) Put ¶
func (p *BucketizedInt64ArrayPool) Put(v []int64, capacity int)
Put puts a value to the pool.
type BucketizedInt64ArrayPoolConfiguration ¶
type BucketizedInt64ArrayPoolConfiguration struct { // The pool bucket configuration. Buckets []Int64ArrayBucketConfiguration `yaml:"buckets"` // The watermark configuration. Watermark Int64ArrayPoolWatermarkConfiguration `yaml:"watermark"` }
BucketizedInt64ArrayPoolConfiguration contains configuration for bucketized pools.
func (*BucketizedInt64ArrayPoolConfiguration) NewBuckets ¶
func (c *BucketizedInt64ArrayPoolConfiguration) NewBuckets() []Int64ArrayBucket
NewBuckets create a new list of buckets.
func (*BucketizedInt64ArrayPoolConfiguration) NewPoolOptions ¶
func (c *BucketizedInt64ArrayPoolConfiguration) NewPoolOptions( instrumentOptions instrument.Options, ) *Int64ArrayPoolOptions
NewPoolOptions creates a new set of pool options.
type BucketizedIntArrayPool ¶
type BucketizedIntArrayPool struct {
// contains filtered or unexported fields
}
BucketizedIntArrayPool is a bucketized value pool.
func NewBucketizedIntArrayPool ¶
func NewBucketizedIntArrayPool(sizes []IntArrayBucket, opts *IntArrayPoolOptions) *BucketizedIntArrayPool
NewBucketizedIntArrayPool creates a bucketized object pool.
func (*BucketizedIntArrayPool) Get ¶
func (p *BucketizedIntArrayPool) Get(capacity int) []int
Get gets a value from the pool.
func (*BucketizedIntArrayPool) Init ¶
func (p *BucketizedIntArrayPool) Init(alloc func(capacity int) []int)
Init initializes the bucketized pool.
func (*BucketizedIntArrayPool) Put ¶
func (p *BucketizedIntArrayPool) Put(v []int, capacity int)
Put puts a value to the pool.
type BucketizedIntArrayPoolConfiguration ¶
type BucketizedIntArrayPoolConfiguration struct { // The pool bucket configuration. Buckets []IntArrayBucketConfiguration `yaml:"buckets"` // The watermark configuration. Watermark IntArrayPoolWatermarkConfiguration `yaml:"watermark"` }
BucketizedIntArrayPoolConfiguration contains configuration for bucketized pools.
func (*BucketizedIntArrayPoolConfiguration) NewBuckets ¶
func (c *BucketizedIntArrayPoolConfiguration) NewBuckets() []IntArrayBucket
NewBuckets create a new list of buckets.
func (*BucketizedIntArrayPoolConfiguration) NewPoolOptions ¶
func (c *BucketizedIntArrayPoolConfiguration) NewPoolOptions( instrumentOptions instrument.Options, ) *IntArrayPoolOptions
NewPoolOptions creates a new set of pool options.
type BytesArrayBucket ¶
type BytesArrayBucket struct { // Capacity is the size of each element in the bucket. Capacity int // Count is the number of fixed elements in the bucket. Count int // Options is an optional override to specify options to use for a bucket, // specify nil to use the options specified to the bucketized pool // constructor for this bucket. Options *BytesArrayPoolOptions }
BytesArrayBucket specifies a bucket.
type BytesArrayBucketConfiguration ¶
type BytesArrayBucketConfiguration struct { // The count of the items in the bucket. Count int `yaml:"count"` // The capacity of each item in the bucket. Capacity int `yaml:"capacity"` }
BytesArrayBucketConfiguration contains configuration for a pool bucket.
func (*BytesArrayBucketConfiguration) NewBucket ¶
func (c *BytesArrayBucketConfiguration) NewBucket() BytesArrayBucket
NewBucket creates a new bucket.
type BytesArrayPool ¶
type BytesArrayPool struct {
// contains filtered or unexported fields
}
BytesArrayPool is a value pool.
func NewBytesArrayPool ¶
func NewBytesArrayPool(opts *BytesArrayPoolOptions) *BytesArrayPool
NewBytesArrayPool creates a new pool.
func (*BytesArrayPool) Get ¶
func (p *BytesArrayPool) Get() [][]byte
Get gets a value from the pool.
func (*BytesArrayPool) Init ¶
func (p *BytesArrayPool) Init(alloc func() [][]byte)
Init initializes the pool.
type BytesArrayPoolConfiguration ¶
type BytesArrayPoolConfiguration struct { // The size of the pool. Size *int `yaml:"size"` // The watermark configuration. Watermark BytesArrayPoolWatermarkConfiguration `yaml:"watermark"` }
BytesArrayPoolConfiguration contains pool configuration.
func (*BytesArrayPoolConfiguration) NewPoolOptions ¶
func (c *BytesArrayPoolConfiguration) NewPoolOptions( instrumentOpts instrument.Options, ) *BytesArrayPoolOptions
NewPoolOptions creates a new set of pool options.
type BytesArrayPoolOptions ¶
type BytesArrayPoolOptions struct {
// contains filtered or unexported fields
}
BytesArrayPoolOptions provide a set of options for the value pool.
func NewBytesArrayPoolOptions ¶
func NewBytesArrayPoolOptions() *BytesArrayPoolOptions
NewBytesArrayPoolOptions create a new set of value pool options.
func (*BytesArrayPoolOptions) InstrumentOptions ¶
func (o *BytesArrayPoolOptions) InstrumentOptions() instrument.Options
InstrumentOptions returns the instrument options.
func (*BytesArrayPoolOptions) RefillHighWatermark ¶
func (o *BytesArrayPoolOptions) RefillHighWatermark() float64
RefillHighWatermark returns the high watermark for stop refilling the pool.
func (*BytesArrayPoolOptions) RefillLowWatermark ¶
func (o *BytesArrayPoolOptions) RefillLowWatermark() float64
RefillLowWatermark returns the low watermark for refilling the pool.
func (*BytesArrayPoolOptions) SetInstrumentOptions ¶
func (o *BytesArrayPoolOptions) SetInstrumentOptions(v instrument.Options) *BytesArrayPoolOptions
SetInstrumentOptions sets the instrument options.
func (*BytesArrayPoolOptions) SetRefillHighWatermark ¶
func (o *BytesArrayPoolOptions) SetRefillHighWatermark(v float64) *BytesArrayPoolOptions
SetRefillHighWatermark sets the high watermark for refilling the pool.
func (*BytesArrayPoolOptions) SetRefillLowWatermark ¶
func (o *BytesArrayPoolOptions) SetRefillLowWatermark(v float64) *BytesArrayPoolOptions
SetRefillLowWatermark sets the low watermark for refilling the pool.
func (*BytesArrayPoolOptions) SetSize ¶
func (o *BytesArrayPoolOptions) SetSize(v int) *BytesArrayPoolOptions
SetSize sets the pool size.
func (*BytesArrayPoolOptions) Size ¶
func (o *BytesArrayPoolOptions) Size() int
Size returns pool size.
type BytesArrayPoolWatermarkConfiguration ¶
type BytesArrayPoolWatermarkConfiguration struct { // The low watermark to start refilling the pool, if zero none. RefillLowWatermark float64 `yaml:"low" validate:"min=0.0,max=1.0"` // The high watermark to stop refilling the pool, if zero none. RefillHighWatermark float64 `yaml:"high" validate:"min=0.0,max=1.0"` }
BytesArrayPoolWatermarkConfiguration contains watermark configuration for pools.
type Float64ArrayBucket ¶
type Float64ArrayBucket struct { // Capacity is the size of each element in the bucket. Capacity int // Count is the number of fixed elements in the bucket. Count int // Options is an optional override to specify options to use for a bucket, // specify nil to use the options specified to the bucketized pool // constructor for this bucket. Options *Float64ArrayPoolOptions }
Float64ArrayBucket specifies a bucket.
type Float64ArrayBucketConfiguration ¶
type Float64ArrayBucketConfiguration struct { // The count of the items in the bucket. Count int `yaml:"count"` // The capacity of each item in the bucket. Capacity int `yaml:"capacity"` }
Float64ArrayBucketConfiguration contains configuration for a pool bucket.
func (*Float64ArrayBucketConfiguration) NewBucket ¶
func (c *Float64ArrayBucketConfiguration) NewBucket() Float64ArrayBucket
NewBucket creates a new bucket.
type Float64ArrayPool ¶
type Float64ArrayPool struct {
// contains filtered or unexported fields
}
Float64ArrayPool is a value pool.
func NewFloat64ArrayPool ¶
func NewFloat64ArrayPool(opts *Float64ArrayPoolOptions) *Float64ArrayPool
NewFloat64ArrayPool creates a new pool.
func (*Float64ArrayPool) Get ¶
func (p *Float64ArrayPool) Get() []float64
Get gets a value from the pool.
func (*Float64ArrayPool) Init ¶
func (p *Float64ArrayPool) Init(alloc func() []float64)
Init initializes the pool.
func (*Float64ArrayPool) Put ¶
func (p *Float64ArrayPool) Put(v []float64)
Put returns a value to pool.
type Float64ArrayPoolConfiguration ¶
type Float64ArrayPoolConfiguration struct { // The size of the pool. Size *int `yaml:"size"` // The watermark configuration. Watermark Float64ArrayPoolWatermarkConfiguration `yaml:"watermark"` }
Float64ArrayPoolConfiguration contains pool configuration.
func (*Float64ArrayPoolConfiguration) NewPoolOptions ¶
func (c *Float64ArrayPoolConfiguration) NewPoolOptions( instrumentOpts instrument.Options, ) *Float64ArrayPoolOptions
NewPoolOptions creates a new set of pool options.
type Float64ArrayPoolOptions ¶
type Float64ArrayPoolOptions struct {
// contains filtered or unexported fields
}
Float64ArrayPoolOptions provide a set of options for the value pool.
func NewFloat64ArrayPoolOptions ¶
func NewFloat64ArrayPoolOptions() *Float64ArrayPoolOptions
NewFloat64ArrayPoolOptions create a new set of value pool options.
func (*Float64ArrayPoolOptions) InstrumentOptions ¶
func (o *Float64ArrayPoolOptions) InstrumentOptions() instrument.Options
InstrumentOptions returns the instrument options.
func (*Float64ArrayPoolOptions) RefillHighWatermark ¶
func (o *Float64ArrayPoolOptions) RefillHighWatermark() float64
RefillHighWatermark returns the high watermark for stop refilling the pool.
func (*Float64ArrayPoolOptions) RefillLowWatermark ¶
func (o *Float64ArrayPoolOptions) RefillLowWatermark() float64
RefillLowWatermark returns the low watermark for refilling the pool.
func (*Float64ArrayPoolOptions) SetInstrumentOptions ¶
func (o *Float64ArrayPoolOptions) SetInstrumentOptions(v instrument.Options) *Float64ArrayPoolOptions
SetInstrumentOptions sets the instrument options.
func (*Float64ArrayPoolOptions) SetRefillHighWatermark ¶
func (o *Float64ArrayPoolOptions) SetRefillHighWatermark(v float64) *Float64ArrayPoolOptions
SetRefillHighWatermark sets the high watermark for refilling the pool.
func (*Float64ArrayPoolOptions) SetRefillLowWatermark ¶
func (o *Float64ArrayPoolOptions) SetRefillLowWatermark(v float64) *Float64ArrayPoolOptions
SetRefillLowWatermark sets the low watermark for refilling the pool.
func (*Float64ArrayPoolOptions) SetSize ¶
func (o *Float64ArrayPoolOptions) SetSize(v int) *Float64ArrayPoolOptions
SetSize sets the pool size.
func (*Float64ArrayPoolOptions) Size ¶
func (o *Float64ArrayPoolOptions) Size() int
Size returns pool size.
type Float64ArrayPoolWatermarkConfiguration ¶
type Float64ArrayPoolWatermarkConfiguration struct { // The low watermark to start refilling the pool, if zero none. RefillLowWatermark float64 `yaml:"low" validate:"min=0.0,max=1.0"` // The high watermark to stop refilling the pool, if zero none. RefillHighWatermark float64 `yaml:"high" validate:"min=0.0,max=1.0"` }
Float64ArrayPoolWatermarkConfiguration contains watermark configuration for pools.
type Int64ArrayBucket ¶
type Int64ArrayBucket struct { // Capacity is the size of each element in the bucket. Capacity int // Count is the number of fixed elements in the bucket. Count int // Options is an optional override to specify options to use for a bucket, // specify nil to use the options specified to the bucketized pool // constructor for this bucket. Options *Int64ArrayPoolOptions }
Int64ArrayBucket specifies a bucket.
type Int64ArrayBucketConfiguration ¶
type Int64ArrayBucketConfiguration struct { // The count of the items in the bucket. Count int `yaml:"count"` // The capacity of each item in the bucket. Capacity int `yaml:"capacity"` }
Int64ArrayBucketConfiguration contains configuration for a pool bucket.
func (*Int64ArrayBucketConfiguration) NewBucket ¶
func (c *Int64ArrayBucketConfiguration) NewBucket() Int64ArrayBucket
NewBucket creates a new bucket.
type Int64ArrayPool ¶
type Int64ArrayPool struct {
// contains filtered or unexported fields
}
Int64ArrayPool is a value pool.
func NewInt64ArrayPool ¶
func NewInt64ArrayPool(opts *Int64ArrayPoolOptions) *Int64ArrayPool
NewInt64ArrayPool creates a new pool.
func (*Int64ArrayPool) Init ¶
func (p *Int64ArrayPool) Init(alloc func() []int64)
Init initializes the pool.
type Int64ArrayPoolConfiguration ¶
type Int64ArrayPoolConfiguration struct { // The size of the pool. Size *int `yaml:"size"` // The watermark configuration. Watermark Int64ArrayPoolWatermarkConfiguration `yaml:"watermark"` }
Int64ArrayPoolConfiguration contains pool configuration.
func (*Int64ArrayPoolConfiguration) NewPoolOptions ¶
func (c *Int64ArrayPoolConfiguration) NewPoolOptions( instrumentOpts instrument.Options, ) *Int64ArrayPoolOptions
NewPoolOptions creates a new set of pool options.
type Int64ArrayPoolOptions ¶
type Int64ArrayPoolOptions struct {
// contains filtered or unexported fields
}
Int64ArrayPoolOptions provide a set of options for the value pool.
func NewInt64ArrayPoolOptions ¶
func NewInt64ArrayPoolOptions() *Int64ArrayPoolOptions
NewInt64ArrayPoolOptions create a new set of value pool options.
func (*Int64ArrayPoolOptions) InstrumentOptions ¶
func (o *Int64ArrayPoolOptions) InstrumentOptions() instrument.Options
InstrumentOptions returns the instrument options.
func (*Int64ArrayPoolOptions) RefillHighWatermark ¶
func (o *Int64ArrayPoolOptions) RefillHighWatermark() float64
RefillHighWatermark returns the high watermark for stop refilling the pool.
func (*Int64ArrayPoolOptions) RefillLowWatermark ¶
func (o *Int64ArrayPoolOptions) RefillLowWatermark() float64
RefillLowWatermark returns the low watermark for refilling the pool.
func (*Int64ArrayPoolOptions) SetInstrumentOptions ¶
func (o *Int64ArrayPoolOptions) SetInstrumentOptions(v instrument.Options) *Int64ArrayPoolOptions
SetInstrumentOptions sets the instrument options.
func (*Int64ArrayPoolOptions) SetRefillHighWatermark ¶
func (o *Int64ArrayPoolOptions) SetRefillHighWatermark(v float64) *Int64ArrayPoolOptions
SetRefillHighWatermark sets the high watermark for refilling the pool.
func (*Int64ArrayPoolOptions) SetRefillLowWatermark ¶
func (o *Int64ArrayPoolOptions) SetRefillLowWatermark(v float64) *Int64ArrayPoolOptions
SetRefillLowWatermark sets the low watermark for refilling the pool.
func (*Int64ArrayPoolOptions) SetSize ¶
func (o *Int64ArrayPoolOptions) SetSize(v int) *Int64ArrayPoolOptions
SetSize sets the pool size.
func (*Int64ArrayPoolOptions) Size ¶
func (o *Int64ArrayPoolOptions) Size() int
Size returns pool size.
type Int64ArrayPoolWatermarkConfiguration ¶
type Int64ArrayPoolWatermarkConfiguration struct { // The low watermark to start refilling the pool, if zero none. RefillLowWatermark float64 `yaml:"low" validate:"min=0.0,max=1.0"` // The high watermark to stop refilling the pool, if zero none. RefillHighWatermark float64 `yaml:"high" validate:"min=0.0,max=1.0"` }
Int64ArrayPoolWatermarkConfiguration contains watermark configuration for pools.
type IntArrayBucket ¶
type IntArrayBucket struct { // Capacity is the size of each element in the bucket. Capacity int // Count is the number of fixed elements in the bucket. Count int // Options is an optional override to specify options to use for a bucket, // specify nil to use the options specified to the bucketized pool // constructor for this bucket. Options *IntArrayPoolOptions }
IntArrayBucket specifies a bucket.
type IntArrayBucketConfiguration ¶
type IntArrayBucketConfiguration struct { // The count of the items in the bucket. Count int `yaml:"count"` // The capacity of each item in the bucket. Capacity int `yaml:"capacity"` }
IntArrayBucketConfiguration contains configuration for a pool bucket.
func (*IntArrayBucketConfiguration) NewBucket ¶
func (c *IntArrayBucketConfiguration) NewBucket() IntArrayBucket
NewBucket creates a new bucket.
type IntArrayPool ¶
type IntArrayPool struct {
// contains filtered or unexported fields
}
IntArrayPool is a value pool.
func NewIntArrayPool ¶
func NewIntArrayPool(opts *IntArrayPoolOptions) *IntArrayPool
NewIntArrayPool creates a new pool.
func (*IntArrayPool) Init ¶
func (p *IntArrayPool) Init(alloc func() []int)
Init initializes the pool.
type IntArrayPoolConfiguration ¶
type IntArrayPoolConfiguration struct { // The size of the pool. Size *int `yaml:"size"` // The watermark configuration. Watermark IntArrayPoolWatermarkConfiguration `yaml:"watermark"` }
IntArrayPoolConfiguration contains pool configuration.
func (*IntArrayPoolConfiguration) NewPoolOptions ¶
func (c *IntArrayPoolConfiguration) NewPoolOptions( instrumentOpts instrument.Options, ) *IntArrayPoolOptions
NewPoolOptions creates a new set of pool options.
type IntArrayPoolOptions ¶
type IntArrayPoolOptions struct {
// contains filtered or unexported fields
}
IntArrayPoolOptions provide a set of options for the value pool.
func NewIntArrayPoolOptions ¶
func NewIntArrayPoolOptions() *IntArrayPoolOptions
NewIntArrayPoolOptions create a new set of value pool options.
func (*IntArrayPoolOptions) InstrumentOptions ¶
func (o *IntArrayPoolOptions) InstrumentOptions() instrument.Options
InstrumentOptions returns the instrument options.
func (*IntArrayPoolOptions) RefillHighWatermark ¶
func (o *IntArrayPoolOptions) RefillHighWatermark() float64
RefillHighWatermark returns the high watermark for stop refilling the pool.
func (*IntArrayPoolOptions) RefillLowWatermark ¶
func (o *IntArrayPoolOptions) RefillLowWatermark() float64
RefillLowWatermark returns the low watermark for refilling the pool.
func (*IntArrayPoolOptions) SetInstrumentOptions ¶
func (o *IntArrayPoolOptions) SetInstrumentOptions(v instrument.Options) *IntArrayPoolOptions
SetInstrumentOptions sets the instrument options.
func (*IntArrayPoolOptions) SetRefillHighWatermark ¶
func (o *IntArrayPoolOptions) SetRefillHighWatermark(v float64) *IntArrayPoolOptions
SetRefillHighWatermark sets the high watermark for refilling the pool.
func (*IntArrayPoolOptions) SetRefillLowWatermark ¶
func (o *IntArrayPoolOptions) SetRefillLowWatermark(v float64) *IntArrayPoolOptions
SetRefillLowWatermark sets the low watermark for refilling the pool.
func (*IntArrayPoolOptions) SetSize ¶
func (o *IntArrayPoolOptions) SetSize(v int) *IntArrayPoolOptions
SetSize sets the pool size.
type IntArrayPoolWatermarkConfiguration ¶
type IntArrayPoolWatermarkConfiguration struct { // The low watermark to start refilling the pool, if zero none. RefillLowWatermark float64 `yaml:"low" validate:"min=0.0,max=1.0"` // The high watermark to stop refilling the pool, if zero none. RefillHighWatermark float64 `yaml:"high" validate:"min=0.0,max=1.0"` }
IntArrayPoolWatermarkConfiguration contains watermark configuration for pools.
type RefCountedPooledBoolArray ¶
type RefCountedPooledBoolArray struct {
// contains filtered or unexported fields
}
RefCountedPooledBoolArray is a refcounted, pooled generic value array.
func NewRefCountedPooledBoolArray ¶
func NewRefCountedPooledBoolArray( vals []bool, p *BucketizedBoolArrayPool, resetFn func(values []bool), ) *RefCountedPooledBoolArray
NewRefCountedPooledBoolArray creates a new refcounted, pooled generic value array.
func (*RefCountedPooledBoolArray) Append ¶
func (rv *RefCountedPooledBoolArray) Append(v bool)
Append appends a value to the value array.
func (*RefCountedPooledBoolArray) Close ¶
func (rv *RefCountedPooledBoolArray) Close()
Close closes the ref counted array.
func (*RefCountedPooledBoolArray) Get ¶
func (rv *RefCountedPooledBoolArray) Get() []bool
Get returns the underlying raw value array.
func (*RefCountedPooledBoolArray) Snapshot ¶
func (rv *RefCountedPooledBoolArray) Snapshot() *RefCountedPooledBoolArray
Snapshot takes a snapshot of the current values in the refcounted array. The returned snapshot shares the backing array with the source array but keeps a copy of the array slice as the snapshot. As a result, new values appended to the end of the array after the snapshot is taken is invisible to the snapshot.
type RefCountedPooledBytesArray ¶
type RefCountedPooledBytesArray struct {
// contains filtered or unexported fields
}
RefCountedPooledBytesArray is a refcounted, pooled generic value array.
func NewRefCountedPooledBytesArray ¶
func NewRefCountedPooledBytesArray( vals [][]byte, p *BucketizedBytesArrayPool, resetFn func(values [][]byte), ) *RefCountedPooledBytesArray
NewRefCountedPooledBytesArray creates a new refcounted, pooled generic value array.
func (*RefCountedPooledBytesArray) Append ¶
func (rv *RefCountedPooledBytesArray) Append(v []byte)
Append appends a value to the value array.
func (*RefCountedPooledBytesArray) Close ¶
func (rv *RefCountedPooledBytesArray) Close()
Close closes the ref counted array.
func (*RefCountedPooledBytesArray) Get ¶
func (rv *RefCountedPooledBytesArray) Get() [][]byte
Get returns the underlying raw value array.
func (*RefCountedPooledBytesArray) Snapshot ¶
func (rv *RefCountedPooledBytesArray) Snapshot() *RefCountedPooledBytesArray
Snapshot takes a snapshot of the current values in the refcounted array. The returned snapshot shares the backing array with the source array but keeps a copy of the array slice as the snapshot. As a result, new values appended to the end of the array after the snapshot is taken is invisible to the snapshot.
type RefCountedPooledFloat64Array ¶
type RefCountedPooledFloat64Array struct {
// contains filtered or unexported fields
}
RefCountedPooledFloat64Array is a refcounted, pooled generic value array.
func NewRefCountedPooledFloat64Array ¶
func NewRefCountedPooledFloat64Array( vals []float64, p *BucketizedFloat64ArrayPool, resetFn func(values []float64), ) *RefCountedPooledFloat64Array
NewRefCountedPooledFloat64Array creates a new refcounted, pooled generic value array.
func (*RefCountedPooledFloat64Array) Append ¶
func (rv *RefCountedPooledFloat64Array) Append(v float64)
Append appends a value to the value array.
func (*RefCountedPooledFloat64Array) Close ¶
func (rv *RefCountedPooledFloat64Array) Close()
Close closes the ref counted array.
func (*RefCountedPooledFloat64Array) Get ¶
func (rv *RefCountedPooledFloat64Array) Get() []float64
Get returns the underlying raw value array.
func (*RefCountedPooledFloat64Array) Snapshot ¶
func (rv *RefCountedPooledFloat64Array) Snapshot() *RefCountedPooledFloat64Array
Snapshot takes a snapshot of the current values in the refcounted array. The returned snapshot shares the backing array with the source array but keeps a copy of the array slice as the snapshot. As a result, new values appended to the end of the array after the snapshot is taken is invisible to the snapshot.
type RefCountedPooledInt64Array ¶
type RefCountedPooledInt64Array struct {
// contains filtered or unexported fields
}
RefCountedPooledInt64Array is a refcounted, pooled generic value array.
func NewRefCountedPooledInt64Array ¶
func NewRefCountedPooledInt64Array( vals []int64, p *BucketizedInt64ArrayPool, resetFn func(values []int64), ) *RefCountedPooledInt64Array
NewRefCountedPooledInt64Array creates a new refcounted, pooled generic value array.
func (*RefCountedPooledInt64Array) Append ¶
func (rv *RefCountedPooledInt64Array) Append(v int64)
Append appends a value to the value array.
func (*RefCountedPooledInt64Array) Close ¶
func (rv *RefCountedPooledInt64Array) Close()
Close closes the ref counted array.
func (*RefCountedPooledInt64Array) Get ¶
func (rv *RefCountedPooledInt64Array) Get() []int64
Get returns the underlying raw value array.
func (*RefCountedPooledInt64Array) Snapshot ¶
func (rv *RefCountedPooledInt64Array) Snapshot() *RefCountedPooledInt64Array
Snapshot takes a snapshot of the current values in the refcounted array. The returned snapshot shares the backing array with the source array but keeps a copy of the array slice as the snapshot. As a result, new values appended to the end of the array after the snapshot is taken is invisible to the snapshot.
type RefCountedPooledIntArray ¶
type RefCountedPooledIntArray struct {
// contains filtered or unexported fields
}
RefCountedPooledIntArray is a refcounted, pooled generic value array.
func NewRefCountedPooledIntArray ¶
func NewRefCountedPooledIntArray( vals []int, p *BucketizedIntArrayPool, resetFn func(values []int), ) *RefCountedPooledIntArray
NewRefCountedPooledIntArray creates a new refcounted, pooled generic value array.
func (*RefCountedPooledIntArray) Append ¶
func (rv *RefCountedPooledIntArray) Append(v int)
Append appends a value to the value array.
func (*RefCountedPooledIntArray) Close ¶
func (rv *RefCountedPooledIntArray) Close()
Close closes the ref counted array.
func (*RefCountedPooledIntArray) Get ¶
func (rv *RefCountedPooledIntArray) Get() []int
Get returns the underlying raw value array.
func (*RefCountedPooledIntArray) Snapshot ¶
func (rv *RefCountedPooledIntArray) Snapshot() *RefCountedPooledIntArray
Snapshot takes a snapshot of the current values in the refcounted array. The returned snapshot shares the backing array with the source array but keeps a copy of the array slice as the snapshot. As a result, new values appended to the end of the array after the snapshot is taken is invisible to the snapshot.
Source Files ¶
- bool_array_pool.gen.go
- bool_array_pool_config.gen.go
- bucketized_bool_array_pool.gen.go
- bucketized_bool_array_pool_config.gen.go
- bucketized_bytes_array_pool.gen.go
- bucketized_bytes_array_pool_config.gen.go
- bucketized_float64_array_pool.gen.go
- bucketized_float64_array_pool_config.gen.go
- bucketized_int64_array_pool.gen.go
- bucketized_int64_array_pool_config.gen.go
- bucketized_int_array_pool.gen.go
- bucketized_int_array_pool_config.gen.go
- bytes_array_pool.gen.go
- bytes_array_pool_config.gen.go
- float64_array_pool.gen.go
- float64_array_pool_config.gen.go
- int64_array_pool.gen.go
- int64_array_pool_config.gen.go
- int_array_pool.gen.go
- int_array_pool_config.gen.go
- ref_counted_pooled_bool_array.gen.go
- ref_counted_pooled_bytes_array.gen.go
- ref_counted_pooled_float64_array.gen.go
- ref_counted_pooled_int64_array.gen.go
- ref_counted_pooled_int_array.gen.go