Documentation ¶
Index ¶
Constants ¶
View Source
const ( CompressorFieldName = "buffer.memory.compressor" CompressorNone = "none" CompressorLZ4 = "lz4" CompressorDefault = CompressorNone )
Variables ¶
View Source
var Component = &app.Component{ Dependencies: app.Components{ configurator.Component, metric.Component, }, Constructor: app.Constructor(func(container container.Container) error { return container.Provides( NewConfig, NewWithConfigurator, func(buffer *Memory) Buffer { return buffer }, ) }), BindFlags: app.BindFlags(BindFlags), }
Functions ¶
Types ¶
type Buffer ¶ added in v1.8.12
type Buffer io.ReadWriteCloser
type BufferReader ¶ added in v1.8.12
type BufferReader struct {
// contains filtered or unexported fields
}
func NewBufferReader ¶ added in v1.8.12
func NewBufferReader() *BufferReader
func (*BufferReader) Len ¶ added in v1.8.12
func (reader *BufferReader) Len() int
func (*BufferReader) Read ¶ added in v1.8.12
func (reader *BufferReader) Read(p []byte) (int, error)
func (*BufferReader) Reset ¶ added in v1.8.12
func (reader *BufferReader) Reset()
type BufferWriter ¶ added in v1.8.12
type BufferWriter struct {
// contains filtered or unexported fields
}
func NewBufferWriter ¶ added in v1.8.12
func NewBufferWriter() *BufferWriter
func (*BufferWriter) Bytes ¶ added in v1.8.12
func (writer *BufferWriter) Bytes() []byte
func (*BufferWriter) Len ¶ added in v1.8.12
func (writer *BufferWriter) Len() int
func (*BufferWriter) Reset ¶ added in v1.8.12
func (writer *BufferWriter) Reset()
type Config ¶
func Configuration ¶
func Configuration(config *Config, configurator configurator.Configurator) *Config
type LZ4Reader ¶ added in v1.8.12
type LZ4Reader struct {
// contains filtered or unexported fields
}
func NewLZ4Reader ¶ added in v1.8.12
type Lz4Writer ¶ added in v1.8.12
type Lz4Writer struct {
// contains filtered or unexported fields
}
func NewLz4Writer ¶ added in v1.8.12
type Memory ¶
type Memory struct {
// contains filtered or unexported fields
}
func NewWithConfigurator ¶
func NewWithConfigurator(config *Config, configurator configurator.Configurator, metric *metric.Metric) (*Memory, error)
type MetricReader ¶ added in v1.8.12
type MetricReader struct { Reader // contains filtered or unexported fields }
func NewMetricReader ¶ added in v1.8.12
func NewMetricReader(reader Reader, counter prometheus.Counter) *MetricReader
type MetricWrite ¶ added in v1.8.12
type MetricWrite struct { Writer // contains filtered or unexported fields }
func NewMetricWrite ¶ added in v1.8.12
func NewMetricWrite(writer Writer, counter prometheus.Counter) *MetricWrite
type Option ¶ added in v1.8.12
type Option func(memory *Memory)
func WithLZ4Reader ¶ added in v1.8.12
func WithLZ4Reader() Option
func WithLz4Writer ¶ added in v1.8.12
func WithLz4Writer() Option
func WithReaderMetric ¶ added in v1.8.12
func WithReaderMetric(counter prometheus.Counter) Option
func WithWriterMetric ¶ added in v1.8.12
func WithWriterMetric(counter prometheus.Counter) Option
Click to show internal directories.
Click to hide internal directories.