Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SubscribeWithExpire ¶
Types ¶
type Event ¶
type Event struct { Flag string `json:"flag,omitempty"` Topic string `json:"topic,omitempty"` Message interface{} `json:"message,omitempty"` Params interface{} `json:"params,omitempty"` Queue string `json:"queue,omitempty"` // contains filtered or unexported fields }
Event is given to a subscription handler for processing
type Handler ¶
Handler is used to process messages via a subscription of a topic. The handler is passed a publication interface which contains the message and optional Ack method to acknowledge receipt of the message.
type Subscriber ¶
type Subscriber struct {
// contains filtered or unexported fields
}
Subscriber 订阅者
Click to show internal directories.
Click to hide internal directories.