Documentation
¶
Index ¶
- func ExpectNilError[T any](f func() (T, error)) T
- func MarshalAndStringify(v interface{}) string
- func NewBatchWithCapacityFrom[V interface{}](indices []int, values []V, capacity int) *batching.Batch[V]
- func TestExponentialBackoff() *messaging.ExponentialBackoff
- func ToPtr[T any](v T) *T
- type MockBatchKeyGetter
- type MockBatchSubmitter
- type MockBatchValueGetter
- type MockHttpClient
- type MockLog
- type MockLogger
- func (m *MockLogger) Error(messages ...string)
- func (m *MockLogger) ErrorNoContextNoFormat(message string)
- func (m *MockLogger) Fatal(messages ...string)
- func (m *MockLogger) FatalNoContextNoFormat(message string)
- func (m *MockLogger) FormatAndAddContext(level logging.Level, messages ...string) string
- func (m *MockLogger) Info(messages ...string)
- func (m *MockLogger) InfoNoContextNoFormat(message string)
- func (m *MockLogger) SetLevel(level logging.Level)
- func (m *MockLogger) Warn(messages ...string)
- func (m *MockLogger) WarnNoContextNoFormat(message string)
- func (m *MockLogger) WithContext(context ...string) logging.Logger
- type MockReadCloser
- type MockRequestFlow
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpectNilError ¶
func MarshalAndStringify ¶
func MarshalAndStringify(v interface{}) string
func NewBatchWithCapacityFrom ¶
func NewBatchWithCapacityFrom[V interface{}](indices []int, values []V, capacity int) *batching.Batch[V]
Resizes the indices and values to the given capacity before returning a new batch.
func TestExponentialBackoff ¶
func TestExponentialBackoff() *messaging.ExponentialBackoff
Types ¶
type MockBatchKeyGetter ¶
type MockBatchKeyGetter[I interface{}, K interface{}] struct {
DoGetBatchKey func(I) (K, error)
}
func (*MockBatchKeyGetter[I, K]) GetBatchKey ¶
func (getter *MockBatchKeyGetter[I, K]) GetBatchKey(input I) (K, error)
type MockBatchSubmitter ¶
type MockBatchValueGetter ¶
type MockBatchValueGetter[I interface{}, V interface{}] struct {
DoGetBatchValue func(I) (V, error)
}
func (*MockBatchValueGetter[I, V]) GetBatchValue ¶
func (getter *MockBatchValueGetter[I, V]) GetBatchValue(input I) (V, error)
type MockHttpClient ¶
type MockLogger ¶
func (*MockLogger) Error ¶
func (m *MockLogger) Error(messages ...string)
func (*MockLogger) ErrorNoContextNoFormat ¶
func (m *MockLogger) ErrorNoContextNoFormat(message string)
func (*MockLogger) Fatal ¶
func (m *MockLogger) Fatal(messages ...string)
func (*MockLogger) FatalNoContextNoFormat ¶
func (m *MockLogger) FatalNoContextNoFormat(message string)
func (*MockLogger) FormatAndAddContext ¶
func (m *MockLogger) FormatAndAddContext(level logging.Level, messages ...string) string
func (*MockLogger) Info ¶
func (m *MockLogger) Info(messages ...string)
func (*MockLogger) InfoNoContextNoFormat ¶
func (m *MockLogger) InfoNoContextNoFormat(message string)
func (*MockLogger) SetLevel ¶
func (m *MockLogger) SetLevel(level logging.Level)
func (*MockLogger) Warn ¶
func (m *MockLogger) Warn(messages ...string)
func (*MockLogger) WarnNoContextNoFormat ¶
func (m *MockLogger) WarnNoContextNoFormat(message string)
func (*MockLogger) WithContext ¶
func (m *MockLogger) WithContext(context ...string) logging.Logger
type MockReadCloser ¶
type MockReadCloser struct {
io.ReadCloser
NCloseCalls int
NReadCalls int
}
func (*MockReadCloser) Close ¶
func (r *MockReadCloser) Close() error
type MockRequestFlow ¶
func (*MockRequestFlow) IsDone ¶
func (m *MockRequestFlow) IsDone() bool
func (*MockRequestFlow) Send ¶
func (m *MockRequestFlow) Send() error
Click to show internal directories.
Click to hide internal directories.