Documentation
¶
Index ¶
- func Carry(ps PubSub) contextx.Carrier
- func MarshalV(v any) ([]byte, error)
- func UnmarshalV(data []byte, v any) error
- func With(ctx context.Context, ps PubSub) context.Context
- 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 ¶
This section is empty.
Functions ¶
func UnmarshalV ¶
Types ¶
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.