Documentation
¶
Index ¶
- Variables
- func CRC(k string) uint16
- func Fnv(k string) uint16
- func MarshalV(v any) ([]byte, error)
- func UnmarshalV(data []byte, v any) error
- type ConsumeMode
- type Handler
- type Hasher
- type Message
- type MessageArshaler
- type MutMessage
- type Option
- type OptionApplier
- type OptionApplyFunc
- type OrderedMessage
- type PubSub
- type Publisher
- type Subscriber
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func UnmarshalV ¶
Types ¶
type ConsumeMode ¶ added in v0.2.24
type ConsumeMode int
const ( // GlobalOrdered messages are processed strictly one by one in the order // they were received globally. GlobalOrdered ConsumeMode = iota // PartitionOrdered messages with the same partition key are processed sequentially, // while messages with different keys are handled in parallel. PartitionOrdered // Concurrent messages are processed in parallel with no guarantee of ordering. // this mode offers the highest throughput. Concurrent )
type Message ¶
type Message interface {
Topic() string
ID() int64
Timestamp() time.Time
Data() []byte
Extra() map[string][]string
}
func NewMessageFromRaw ¶
func ParseMessage ¶
ParseMessage data from message queue consumer
type MessageArshaler ¶
type MutMessage ¶
type OptionApplier ¶
type OptionApplier interface {
Apply(Option)
}
type OptionApplyFunc ¶
type OptionApplyFunc func(Option)
func (OptionApplyFunc) Apply ¶
func (f OptionApplyFunc) Apply(opt Option)
type OrderedMessage ¶
type PubSub ¶
type PubSub interface {
// Publisher returns a publisher
Publisher(ctx context.Context, options ...OptionApplier) (Publisher, error)
// Subscriber returns a subscriber
Subscriber(ctx context.Context, options ...OptionApplier) (Subscriber, error)
// Close closes pub/sub endpoint
Close() error
}
Click to show internal directories.
Click to hide internal directories.