Documentation ¶
Index ¶
- func RegPubSubCreator(typeName string, creator PubSubCreatorFunc)
- type KafkaPubSubClient
- func (o *KafkaPubSubClient) Publish(subject string, msg interface{}) error
- func (o *KafkaPubSubClient) QueueSubscribe(subject string, queue string, eventHandler PubSubEventHandler)
- func (o *KafkaPubSubClient) Request(subject string, msg interface{}, timeOut ...time.Duration) (string, error)
- func (o *KafkaPubSubClient) RequestSubscribe(subject string, eventHandler PubSubReqEventHandler)
- func (o *KafkaPubSubClient) Subscribe(subject string, eventHandler PubSubEventHandler)
- type NatsPubSubClient
- func (o *NatsPubSubClient) Publish(subject string, msg interface{}) error
- func (o *NatsPubSubClient) QueueSubscribe(subject string, queue string, eventHandler PubSubEventHandler)
- func (o *NatsPubSubClient) Request(subject string, msg interface{}, timeOut ...time.Duration) (string, error)
- func (o *NatsPubSubClient) RequestSubscribe(subject string, eventHandler PubSubReqEventHandler)
- func (o *NatsPubSubClient) Subscribe(subject string, eventHandler PubSubEventHandler)
- type PubSubClient
- type PubSubCreatorFunc
- type PubSubEventHandler
- type PubSubReqEventHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegPubSubCreator ¶
func RegPubSubCreator(typeName string, creator PubSubCreatorFunc)
Types ¶
type KafkaPubSubClient ¶ added in v0.1.20
type KafkaPubSubClient struct {
// contains filtered or unexported fields
}
func (*KafkaPubSubClient) Publish ¶ added in v0.1.20
func (o *KafkaPubSubClient) Publish(subject string, msg interface{}) error
func (*KafkaPubSubClient) QueueSubscribe ¶ added in v0.1.20
func (o *KafkaPubSubClient) QueueSubscribe(subject string, queue string, eventHandler PubSubEventHandler)
func (*KafkaPubSubClient) RequestSubscribe ¶ added in v0.1.20
func (o *KafkaPubSubClient) RequestSubscribe(subject string, eventHandler PubSubReqEventHandler)
func (*KafkaPubSubClient) Subscribe ¶ added in v0.1.20
func (o *KafkaPubSubClient) Subscribe(subject string, eventHandler PubSubEventHandler)
type NatsPubSubClient ¶
type NatsPubSubClient struct {
// contains filtered or unexported fields
}
func (*NatsPubSubClient) Publish ¶
func (o *NatsPubSubClient) Publish(subject string, msg interface{}) error
func (*NatsPubSubClient) QueueSubscribe ¶
func (o *NatsPubSubClient) QueueSubscribe(subject string, queue string, eventHandler PubSubEventHandler)
func (*NatsPubSubClient) RequestSubscribe ¶
func (o *NatsPubSubClient) RequestSubscribe(subject string, eventHandler PubSubReqEventHandler)
func (*NatsPubSubClient) Subscribe ¶
func (o *NatsPubSubClient) Subscribe(subject string, eventHandler PubSubEventHandler)
type PubSubClient ¶
type PubSubClient interface { Publish(subject string, msg interface{}) error Request(subject string, msg interface{}, timeOut ...time.Duration) (string, error) Subscribe(subject string, eventHandler PubSubEventHandler) RequestSubscribe(subject string, eventHandler PubSubReqEventHandler) QueueSubscribe(subject string, queue string, eventHandler PubSubEventHandler) }
func Get ¶
func Get(name ...string) PubSubClient
type PubSubCreatorFunc ¶
type PubSubCreatorFunc func(connString string) (PubSubClient, error)
type PubSubEventHandler ¶
type PubSubReqEventHandler ¶
Click to show internal directories.
Click to hide internal directories.