Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitEventBus ¶
func InitEventBus()
Types ¶
type EventBus ¶
type EventBus interface { Init() // async send msg Publish([]byte) PublishEvent(*proto.PaasEvent) // blocking receive msg when received Receive() (interface{}, error) Close() }
func NewPulsarBusImpl ¶
func NewPulsarBusImpl() EventBus
type EventBusConsumer ¶
type EventBusConsumer interface { // poll one msg from local cache queue or from broker Receive() (interface{}, error) // close consumer Close() }
func CreatePulsarConsumer ¶
func CreatePulsarConsumer() EventBusConsumer
type EventBusProducer ¶
type EventBusProducer interface { // sync send msg Send([]byte) error // async send msg SendAsync([]byte) // close producer Close() }
func CreatePulsarProducer ¶
func CreatePulsarProducer() EventBusProducer
type PulsarBusImpl ¶
type PulsarBusImpl struct {
// contains filtered or unexported fields
}
func (*PulsarBusImpl) Close ¶
func (p *PulsarBusImpl) Close()
func (*PulsarBusImpl) Init ¶
func (p *PulsarBusImpl) Init()
func (*PulsarBusImpl) Publish ¶
func (p *PulsarBusImpl) Publish(data []byte)
func (*PulsarBusImpl) PublishEvent ¶
func (p *PulsarBusImpl) PublishEvent(event *proto.PaasEvent)
func (*PulsarBusImpl) Receive ¶
func (p *PulsarBusImpl) Receive() (interface{}, error)
type PulsarConsumer ¶
type PulsarConsumer struct {
// contains filtered or unexported fields
}
func (PulsarConsumer) Close ¶
func (m PulsarConsumer) Close()
func (PulsarConsumer) Receive ¶
func (m PulsarConsumer) Receive() (interface{}, error)
type PulsarProducer ¶
type PulsarProducer struct {
// contains filtered or unexported fields
}
func (PulsarProducer) Close ¶
func (m PulsarProducer) Close()
func (PulsarProducer) Send ¶
func (m PulsarProducer) Send(data []byte) error
func (PulsarProducer) SendAsync ¶
func (m PulsarProducer) SendAsync(data []byte)
Source Files
¶
Click to show internal directories.
Click to hide internal directories.