Documentation
¶
Overview ¶
Package writer is a generated GoMock package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewStoragePolicyFilter ¶ added in v0.5.0
func NewStoragePolicyFilter(acceptedStoragePolicies []policy.StoragePolicy) producer.FilterFunc
NewStoragePolicyFilter creates a new storage policy based filter.
Types ¶
type MockWriter ¶
type MockWriter struct {
// contains filtered or unexported fields
}
MockWriter is a mock of Writer interface
func NewMockWriter ¶
func NewMockWriter(ctrl *gomock.Controller) *MockWriter
NewMockWriter creates a new mock instance
func (*MockWriter) EXPECT ¶
func (m *MockWriter) EXPECT() *MockWriterMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockWriter) Write ¶
func (m *MockWriter) Write(arg0 aggregated.ChunkedMetricWithStoragePolicy) error
Write mocks base method
type MockWriterMockRecorder ¶
type MockWriterMockRecorder struct {
// contains filtered or unexported fields
}
MockWriterMockRecorder is the mock recorder for MockWriter
func (*MockWriterMockRecorder) Close ¶
func (mr *MockWriterMockRecorder) Close() *gomock.Call
Close indicates an expected call of Close
func (*MockWriterMockRecorder) Flush ¶
func (mr *MockWriterMockRecorder) Flush() *gomock.Call
Flush indicates an expected call of Flush
func (*MockWriterMockRecorder) Write ¶
func (mr *MockWriterMockRecorder) Write(arg0 interface{}) *gomock.Call
Write indicates an expected call of Write
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 instrument options.
SetInstrumentOptions(value instrument.Options) Options
// InstrumentOptions returns the instrument options.
InstrumentOptions() instrument.Options
// SetBytesPool sets the bytes pool.
SetBytesPool(value pool.BytesPool) Options
// BytesPool returns the bytes pool.
BytesPool() pool.BytesPool
// SetEncodingTimeSampleRate sets the sampling rate at which the encoding time is
// included in the encoded data. A value of 0 means the encoding time is never included,
// and a value of 1 means the encoding time is always included.
SetEncodingTimeSamplingRate(value float64) Options
// EncodingTimeSamplingRate returns the sampling rate at which the encoding time is
// included in the encoded data. A value of 0 means the encoding time is never included,
// and a value of 1 means the encoding time is always included.
EncodingTimeSamplingRate() float64
}
Options provide a set of options for the writer.
type Writer ¶
type Writer interface {
// Write writes an aggregated metric alongside its storage policy.
Write(mp aggregated.ChunkedMetricWithStoragePolicy) error
// Flush flushes data buffered in the writer to backend.
Flush() error
// Close closes the writer.
Close() error
}
Writer writes aggregated metrics alongside their policies.
func NewBlackholeWriter ¶
func NewBlackholeWriter() Writer
NewBlackholeWriter creates a new blackhole writer.
func NewLoggingWriter ¶
NewLoggingWriter creates a new logging writer.
func NewMultiWriter ¶
NewMultiWriter creates a new multi-writer.