Documentation ¶
Index ¶
- type Message
- type MessageID
- type MockMessageID
- type MockMessageID_AtEarliestPosition_Call
- func (_c *MockMessageID_AtEarliestPosition_Call) Return(_a0 bool) *MockMessageID_AtEarliestPosition_Call
- func (_c *MockMessageID_AtEarliestPosition_Call) Run(run func()) *MockMessageID_AtEarliestPosition_Call
- func (_c *MockMessageID_AtEarliestPosition_Call) RunAndReturn(run func() bool) *MockMessageID_AtEarliestPosition_Call
- type MockMessageID_Equal_Call
- type MockMessageID_Expecter
- func (_e *MockMessageID_Expecter) AtEarliestPosition() *MockMessageID_AtEarliestPosition_Call
- func (_e *MockMessageID_Expecter) Equal(msgID interface{}) *MockMessageID_Equal_Call
- func (_e *MockMessageID_Expecter) LessOrEqualThan(msgID interface{}) *MockMessageID_LessOrEqualThan_Call
- func (_e *MockMessageID_Expecter) Serialize() *MockMessageID_Serialize_Call
- type MockMessageID_LessOrEqualThan_Call
- func (_c *MockMessageID_LessOrEqualThan_Call) Return(_a0 bool, _a1 error) *MockMessageID_LessOrEqualThan_Call
- func (_c *MockMessageID_LessOrEqualThan_Call) Run(run func(msgID []byte)) *MockMessageID_LessOrEqualThan_Call
- func (_c *MockMessageID_LessOrEqualThan_Call) RunAndReturn(run func([]byte) (bool, error)) *MockMessageID_LessOrEqualThan_Call
- type MockMessageID_Serialize_Call
- type ProducerMessage
- type ProducerOptions
- type SubscriptionInitialPosition
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message interface { // Topic get the topic from which this message originated from Topic() string // Properties are application defined key/value pairs that will be attached to the message. // Return the properties attached to the message. Properties() map[string]string // Payload get the payload of the message Payload() []byte // ID get the unique message ID associated with this message. // The message id can be used to univocally refer to a message without having the keep the entire payload in memory. ID() MessageID }
Message is the interface that provides operations of a consumer
type MessageID ¶
type MessageID interface { // Serialize the message id into a sequence of bytes that can be stored somewhere else Serialize() []byte AtEarliestPosition() bool LessOrEqualThan(msgID []byte) (bool, error) Equal(msgID []byte) (bool, error) }
MessageID is the interface that provides operations of message is
type MockMessageID ¶
MockMessageID is an autogenerated mock type for the MessageID type
func NewMockMessageID ¶
func NewMockMessageID(t interface { mock.TestingT Cleanup(func()) }) *MockMessageID
NewMockMessageID creates a new instance of MockMessageID. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockMessageID) AtEarliestPosition ¶
func (_m *MockMessageID) AtEarliestPosition() bool
AtEarliestPosition provides a mock function with given fields:
func (*MockMessageID) EXPECT ¶
func (_m *MockMessageID) EXPECT() *MockMessageID_Expecter
func (*MockMessageID) Equal ¶
func (_m *MockMessageID) Equal(msgID []byte) (bool, error)
Equal provides a mock function with given fields: msgID
func (*MockMessageID) LessOrEqualThan ¶
func (_m *MockMessageID) LessOrEqualThan(msgID []byte) (bool, error)
LessOrEqualThan provides a mock function with given fields: msgID
func (*MockMessageID) Serialize ¶
func (_m *MockMessageID) Serialize() []byte
Serialize provides a mock function with given fields:
type MockMessageID_AtEarliestPosition_Call ¶
MockMessageID_AtEarliestPosition_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AtEarliestPosition'
func (*MockMessageID_AtEarliestPosition_Call) Return ¶
func (_c *MockMessageID_AtEarliestPosition_Call) Return(_a0 bool) *MockMessageID_AtEarliestPosition_Call
func (*MockMessageID_AtEarliestPosition_Call) Run ¶
func (_c *MockMessageID_AtEarliestPosition_Call) Run(run func()) *MockMessageID_AtEarliestPosition_Call
func (*MockMessageID_AtEarliestPosition_Call) RunAndReturn ¶
func (_c *MockMessageID_AtEarliestPosition_Call) RunAndReturn(run func() bool) *MockMessageID_AtEarliestPosition_Call
type MockMessageID_Equal_Call ¶
MockMessageID_Equal_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Equal'
func (*MockMessageID_Equal_Call) Return ¶
func (_c *MockMessageID_Equal_Call) Return(_a0 bool, _a1 error) *MockMessageID_Equal_Call
func (*MockMessageID_Equal_Call) Run ¶
func (_c *MockMessageID_Equal_Call) Run(run func(msgID []byte)) *MockMessageID_Equal_Call
func (*MockMessageID_Equal_Call) RunAndReturn ¶
func (_c *MockMessageID_Equal_Call) RunAndReturn(run func([]byte) (bool, error)) *MockMessageID_Equal_Call
type MockMessageID_Expecter ¶
type MockMessageID_Expecter struct {
// contains filtered or unexported fields
}
func (*MockMessageID_Expecter) AtEarliestPosition ¶
func (_e *MockMessageID_Expecter) AtEarliestPosition() *MockMessageID_AtEarliestPosition_Call
AtEarliestPosition is a helper method to define mock.On call
func (*MockMessageID_Expecter) Equal ¶
func (_e *MockMessageID_Expecter) Equal(msgID interface{}) *MockMessageID_Equal_Call
Equal is a helper method to define mock.On call
- msgID []byte
func (*MockMessageID_Expecter) LessOrEqualThan ¶
func (_e *MockMessageID_Expecter) LessOrEqualThan(msgID interface{}) *MockMessageID_LessOrEqualThan_Call
LessOrEqualThan is a helper method to define mock.On call
- msgID []byte
func (*MockMessageID_Expecter) Serialize ¶
func (_e *MockMessageID_Expecter) Serialize() *MockMessageID_Serialize_Call
Serialize is a helper method to define mock.On call
type MockMessageID_LessOrEqualThan_Call ¶
MockMessageID_LessOrEqualThan_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LessOrEqualThan'
func (*MockMessageID_LessOrEqualThan_Call) Return ¶
func (_c *MockMessageID_LessOrEqualThan_Call) Return(_a0 bool, _a1 error) *MockMessageID_LessOrEqualThan_Call
func (*MockMessageID_LessOrEqualThan_Call) Run ¶
func (_c *MockMessageID_LessOrEqualThan_Call) Run(run func(msgID []byte)) *MockMessageID_LessOrEqualThan_Call
func (*MockMessageID_LessOrEqualThan_Call) RunAndReturn ¶
func (_c *MockMessageID_LessOrEqualThan_Call) RunAndReturn(run func([]byte) (bool, error)) *MockMessageID_LessOrEqualThan_Call
type MockMessageID_Serialize_Call ¶
MockMessageID_Serialize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Serialize'
func (*MockMessageID_Serialize_Call) Return ¶
func (_c *MockMessageID_Serialize_Call) Return(_a0 []byte) *MockMessageID_Serialize_Call
func (*MockMessageID_Serialize_Call) Run ¶
func (_c *MockMessageID_Serialize_Call) Run(run func()) *MockMessageID_Serialize_Call
func (*MockMessageID_Serialize_Call) RunAndReturn ¶
func (_c *MockMessageID_Serialize_Call) RunAndReturn(run func() []byte) *MockMessageID_Serialize_Call
type ProducerMessage ¶
type ProducerMessage struct { // Payload get the payload of the message Payload []byte // Properties are application defined key/value pairs that will be attached to the message. // Return the properties attached to the message. Properties map[string]string }
ProducerMessage contains the messages of a producer
type ProducerOptions ¶
type ProducerOptions struct { // The topic that this Producer will publish Topic string // Enable compression // For Pulsar, this enables ZSTD compression with default compression level EnableCompression bool }
ProducerOptions contains the options of a producer
type SubscriptionInitialPosition ¶
type SubscriptionInitialPosition int
SubscriptionInitialPosition is the type of a subscription initial position
const ( // SubscriptionPositionLatest is latest position which means the start consuming position will be the last message SubscriptionPositionLatest SubscriptionInitialPosition = iota // SubscriptionPositionEarliest is earliest position which means the start consuming position will be the first message SubscriptionPositionEarliest // SubscriptionPositionUnkown indicates we don't care about the consumer location, since we are doing another seek or only some meta api over that SubscriptionPositionUnknown )