broker

package
v0.0.0-...-8a7433f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetMessageQueue

func GetMessageQueue() chan EventMessage

GetMessageQueue to push

func Push

func Push(msg EventMessage)

Push ...

func PushMessage

func PushMessage()

PushMessage 推送消息到前端

func RegisterEventWorker

func RegisterEventWorker(service micro.Service)

RegisterEventWorker for status

Types

type EventMessage

type EventMessage struct {
	Topic   string
	Message *proto.MessageEntity
}

EventMessage ...

type EventWorker

type EventWorker struct {
	// contains filtered or unexported fields
}

EventWorker is an status publisher for the go-micro broker

func NewEventSubPub

func NewEventSubPub(service micro.Service) *EventWorker

NewEventSubPub creates a new broker status publisher

func (*EventWorker) EventProcess

func (a *EventWorker) EventProcess(ctx context.Context, eventMessage *proto.MessageEntity) error

EventProcess Event for MessageBus

type Message

type Message struct {
	Data EventMessage
}

Message Struct

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL