Documentation ¶
Index ¶
- Variables
- type Broker
- type CallBack
- type Event
- type Message
- type PublishOption
- func SetPubContext(cxt context.Context) PublishOption
- func SetPubExchangeAD(ad bool) PublishOption
- func SetPubExchangeDuration(duration bool) PublishOption
- func SetPubExchangeName(en string) PublishOption
- func SetPubExchangeType(et string) PublishOption
- func SetPubPart(p int) PublishOption
- func SetPubQOS(qos int) PublishOption
- func SetPubReplica(r int) PublishOption
- func SetPubRetained(r bool) PublishOption
- type PublishOptions
- type SubscribeOption
- func SetSubAutoAck(autoAck bool) SubscribeOption
- func SetSubAutoDel(autoDel bool) SubscribeOption
- func SetSubContext(cxt context.Context) SubscribeOption
- func SetSubDuration(duration bool) SubscribeOption
- func SetSubExchangeAD(ad bool) SubscribeOption
- func SetSubExchangeDuration(duration bool) SubscribeOption
- func SetSubExchangeName(en string) SubscribeOption
- func SetSubExchangeType(et string) SubscribeOption
- func SetSubPart(p int) SubscribeOption
- func SetSubQOS(qos int) SubscribeOption
- func SetSubQueue(queue string) SubscribeOption
- func SetSubReplica(r int) SubscribeOption
- type SubscribeOptions
- type Subscriber
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Broker ¶
type Broker interface { fmt.Stringer Publish(topic string, msg *Message, opt ...PublishOption) error Subscribe(topics []string, callBack CallBack, opt ...SubscribeOption) (Subscriber, error) Connect() error Disconnect() error }
Broker
type PublishOption ¶
type PublishOption func(*PublishOptions)
func SetPubExchangeDuration ¶
func SetPubExchangeDuration(duration bool) PublishOption
SetPubExchangeDuration
type PublishOptions ¶
type PublishOptions struct { ExchangeName string ExchangeType string ExchangeAD bool // exchange auto delete ExchangeDuration bool // exchange duration Context context.Context QOS int Retained bool // kafka Part int Replica int }
func (*PublishOptions) Marshal ¶
func (p *PublishOptions) Marshal() string
func (*PublishOptions) String ¶
func (p *PublishOptions) String() string
type SubscribeOption ¶
type SubscribeOption func(*SubscribeOptions)
func SetSubExchangeDuration ¶
func SetSubExchangeDuration(duration bool) SubscribeOption
SetSubExchangeDuration
type SubscribeOptions ¶
type SubscribeOptions struct { AutoAck bool AutoDel bool Duration bool Queue string ExchangeName string ExchangeType string ExchangeAD bool // exchange auto delete ExchangeDuration bool // exchange duration QOS int Context context.Context // kafka Part int Replica int }
func (*SubscribeOptions) Marshal ¶
func (s *SubscribeOptions) Marshal() string
func (*SubscribeOptions) String ¶
func (s *SubscribeOptions) String() string
Click to show internal directories.
Click to hide internal directories.