Documentation
¶
Index ¶
- type Buffer
- type MockUnaggregatedEncoder
- func (_m *MockUnaggregatedEncoder) EXPECT() *_MockUnaggregatedEncoderRecorder
- func (_m *MockUnaggregatedEncoder) EncodeMessage(_param0 encoding.UnaggregatedMessageUnion) error
- func (_m *MockUnaggregatedEncoder) Len() int
- func (_m *MockUnaggregatedEncoder) Relinquish() Buffer
- func (_m *MockUnaggregatedEncoder) Reset(_param0 []byte)
- func (_m *MockUnaggregatedEncoder) Truncate(_param0 int) error
- type UnaggregatedEncoder
- type UnaggregatedIterator
- type UnaggregatedOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Buffer ¶
type Buffer struct {
// contains filtered or unexported fields
}
Buffer contains a byte slice backed by an optional bytes pool.
type MockUnaggregatedEncoder ¶
type MockUnaggregatedEncoder struct {
// contains filtered or unexported fields
}
Mock of UnaggregatedEncoder interface
func NewMockUnaggregatedEncoder ¶
func NewMockUnaggregatedEncoder(ctrl *gomock.Controller) *MockUnaggregatedEncoder
func (*MockUnaggregatedEncoder) EXPECT ¶
func (_m *MockUnaggregatedEncoder) EXPECT() *_MockUnaggregatedEncoderRecorder
func (*MockUnaggregatedEncoder) EncodeMessage ¶
func (_m *MockUnaggregatedEncoder) EncodeMessage(_param0 encoding.UnaggregatedMessageUnion) error
func (*MockUnaggregatedEncoder) Len ¶
func (_m *MockUnaggregatedEncoder) Len() int
func (*MockUnaggregatedEncoder) Relinquish ¶
func (_m *MockUnaggregatedEncoder) Relinquish() Buffer
func (*MockUnaggregatedEncoder) Reset ¶
func (_m *MockUnaggregatedEncoder) Reset(_param0 []byte)
func (*MockUnaggregatedEncoder) Truncate ¶
func (_m *MockUnaggregatedEncoder) Truncate(_param0 int) error
type UnaggregatedEncoder ¶
type UnaggregatedEncoder interface {
// Len returns the number of bytes accumulated in the encoder so far.
Len() int
// Reset resets the encoder buffer with optional initial data.
Reset(initData []byte)
// Truncate discards all but the first n encoded bytes but continues to use
// the same allocated storage. If n is negative or greater than the length of
// encoded buffer, an error is returned.
Truncate(n int) error
// EncodeMessage encodes an unaggregated message.
EncodeMessage(msg encoding.UnaggregatedMessageUnion) error
// Relinquish relinquishes ownership of the encoded byte stream to the caller,
// and resets the internal encoding buffer.
Relinquish() Buffer
}
UnaggregatedEncoder encodes unaggregated metrics.
func NewUnaggregatedEncoder ¶
func NewUnaggregatedEncoder(opts UnaggregatedOptions) UnaggregatedEncoder
NewUnaggregatedEncoder creates a new unaggregated encoder.
type UnaggregatedIterator ¶
type UnaggregatedIterator interface {
// Next returns true if there are more items to decode.
Next() bool
// Current returns the current decoded value.
Current() encoding.UnaggregatedMessageUnion
// Err returns the error encountered during decoding, if any.
Err() error
// Close closes the iterator.
Close()
}
UnaggregatedIterator decodes unaggregated metrics.
func NewUnaggregatedIterator ¶
func NewUnaggregatedIterator( reader encoding.ByteReadScanner, opts UnaggregatedOptions, ) UnaggregatedIterator
NewUnaggregatedIterator creates a new unaggregated iterator.
type UnaggregatedOptions ¶
type UnaggregatedOptions interface {
// SetBytesPool sets the bytes pool.
SetBytesPool(value pool.BytesPool) UnaggregatedOptions
// BytesPool returns the bytes pool.
BytesPool() pool.BytesPool
// SetInitBufferSize sets the initial buffer size.
SetInitBufferSize(value int) UnaggregatedOptions
// InitBufferSize returns the initial buffer size.
InitBufferSize() int
// SetMaxMessageSize sets the maximum message size.
SetMaxMessageSize(value int) UnaggregatedOptions
// MaxMessageSize returns the maximum message size.
MaxMessageSize() int
}
UnaggregatedOptions provide a set of options for the unaggregated encoder and iterator.
func NewUnaggregatedOptions ¶
func NewUnaggregatedOptions() UnaggregatedOptions
NewUnaggregatedOptions create a new set of unaggregated options.
Click to show internal directories.
Click to hide internal directories.