Documentation
¶
Overview ¶
Package writer is a generated GoMock package.
Index ¶
- func NewRoutingPolicyFilter(p RoutingPolicyFilterParams, configSource producer.FilterFuncConfigSourceType) producer.FilterFunc
- func NewStoragePolicyFilter(acceptedStoragePolicies []policy.StoragePolicy, ...) producer.FilterFunc
- type MockWriter
- type MockWriterMockRecorder
- type Options
- type RoutingPolicyFilterParams
- type Writer
- func NewBlackholeWriter() Writer
- func NewLoggingWriter(logger *zap.Logger) Writer
- func NewMultiWriter(writers []Writer) Writer
- func NewProtobufWriter(producer producer.Producer, shardFn sharding.ShardFn, opts Options) Writer
- func NewShardedWriter(writers []Writer, shardFn sharding.AggregatedShardFn, iOpts instrument.Options) (Writer, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRoutingPolicyFilter ¶ added in v1.6.0
func NewRoutingPolicyFilter( p RoutingPolicyFilterParams, configSource producer.FilterFuncConfigSourceType, ) producer.FilterFunc
NewRoutingPolicyFilter creates a new routing policy based filter.
func NewStoragePolicyFilter ¶ added in v0.5.0
func NewStoragePolicyFilter( acceptedStoragePolicies []policy.StoragePolicy, configSource producer.FilterFuncConfigSourceType) 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 is deprecated
SetClockOptions(value clock.Options) Options
// ClockOptions is deprecated
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
// SetEncodingTimeSamplingRate is deprecated
SetEncodingTimeSamplingRate(value float64) Options
// EncodingTimeSamplingRate is deprecated
EncodingTimeSamplingRate() float64
}
Options provide a set of options for the writer.
type RoutingPolicyFilterParams ¶ added in v1.6.0
type RoutingPolicyFilterParams struct {
Logger *zap.Logger
Scope tally.Scope
RoutingPolicyHandler routing.PolicyHandler
IsDefault bool
AllowedTrafficTypes []string
}
RoutingPolicyFilterParams provides parameters for creating a routing policy filter.
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.
func NewProtobufWriter ¶ added in v0.5.0
func NewProtobufWriter( producer producer.Producer, shardFn sharding.ShardFn, opts Options, ) Writer
NewProtobufWriter creates a writer that encodes metric in protobuf.
func NewShardedWriter ¶
func NewShardedWriter( writers []Writer, shardFn sharding.AggregatedShardFn, iOpts instrument.Options, ) (Writer, error)
NewShardedWriter shards writes to the provided writers with the given sharding fn.