Versions in this module Expand all Collapse all v1 v1.0.0 Jul 29, 2018 Changes in this version + const PublishService + const RegisterService + type Bus interface + func New() Bus + func NewWithPublishHandler(publishHandler PublishHandler) Bus + type BusController interface + HasCallback func(topic string) bool + WaitAsync func() + type BusPublisher interface + Publish func(topic string, args ...interface{}) + type BusSubscriber interface + Subscribe func(topic string, fn interface{}) error + SubscribeAsync func(topic string, fn interface{}, transactional bool) error + SubscribeOnce func(topic string, fn interface{}) error + SubscribeOnceAsync func(topic string, fn interface{}) error + Unsubscribe func(topic string, handler interface{}) error + type Client struct + func NewClient(address, path string, eventBus Bus) *Client + func (client *Client) EventBus() Bus + func (client *Client) Start() error + func (client *Client) Stop() + func (client *Client) Subscribe(topic string, fn interface{}, serverAddr, serverPath string) + func (client *Client) SubscribeOnce(topic string, fn interface{}, serverAddr, serverPath string) + type ClientArg struct + Args []interface{} + Topic string + type ClientService struct + func (service *ClientService) PushEvent(arg *ClientArg, reply *bool) error + type EventBus struct + func (bus *EventBus) HasCallback(topic string) bool + func (bus *EventBus) Publish(topic string, args ...interface{}) + func (bus *EventBus) Subscribe(topic string, fn interface{}) error + func (bus *EventBus) SubscribeAsync(topic string, fn interface{}, transactional bool) error + func (bus *EventBus) SubscribeOnce(topic string, fn interface{}) error + func (bus *EventBus) SubscribeOnceAsync(topic string, fn interface{}) error + func (bus *EventBus) Unsubscribe(topic string, handler interface{}) error + func (bus *EventBus) WaitAsync() + type NetworkBus struct + func NewNetworkBus(address, path string) *NetworkBus + func (networkBus *NetworkBus) EventBus() Bus + func (networkBus *NetworkBus) Start() error + func (networkBus *NetworkBus) Stop() + type NetworkBusService struct + type PublishHandler interface + PrePublish func(topic string, args ...interface{}) + Publish func(topic string, args []interface{}, callback reflect.Value, ...) + type Server struct + func NewServer(address, path string, eventBus Bus) *Server + func (server *Server) EventBus() Bus + func (server *Server) HasClientSubscribed(arg *SubscribeArg) bool + func (server *Server) Start() error + func (server *Server) Stop() + type ServerService struct + func (service *ServerService) Register(arg *SubscribeArg, success *bool) error + type SubscribeArg struct + ClientAddr string + ClientPath string + ServiceMethod string + SubscribeType SubscribeType + Topic string + type SubscribeType int + const Subscribe + const SubscribeOnce