Documentation ¶
Index ¶
Constants ¶
View Source
const ( MaxLen = 1<<32 - 1 MaxRetry = 1<<8 - 1 HeaderLen = 4 + 8 + 1 )
Memory model in message
| len | ts | retry | payload | | -------------- | ----------------- | ------------- | ------------ | | payload length | enqueue timestamp | enqueue times | message body | | uint32 | int64 | uint8 | []byte | | 4294967295 | - | 255 | 4095MB |
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageHandler ¶
type MessageHandlerFunc ¶
func (MessageHandlerFunc) HandleMessage ¶
func (h MessageHandlerFunc) HandleMessage(bts []byte) (err error)
type MessageQueue ¶
type MessageQueue interface { Publish(topic string, bts []byte) (err error) Subscribe(topic string, handler MessageHandler) }
Click to show internal directories.
Click to hide internal directories.