Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/asaskevich/EventBus
/ functions
Functions
60 in github.com/asaskevich/EventBus
⨍
Functions
60
◇
Types & classes
16
↓ 18 callers
Function
New
New returns new EventBus with empty handlers.
event_bus.go:52
↓ 14 callers
Method
Publish
(topic string, args ...interface{})
event_bus.go:20
↓ 13 callers
Method
Subscribe
(topic string, fn interface{})
event_bus.go:11
↓ 5 callers
Method
HasCallback
(topic string)
event_bus.go:25
↓ 4 callers
Function
NewClient
NewClient - create a client object with the address and server path
client.go:32
↓ 4 callers
Function
NewServer
NewServer - create a new Server at the address and path
server.go:46
↓ 4 callers
Method
SubscribeOnce
(topic string, fn interface{})
event_bus.go:13
↓ 4 callers
Method
Unsubscribe
(topic string, handler interface{})
event_bus.go:15
↓ 4 callers
Method
WaitAsync
()
event_bus.go:26
↓ 4 callers
Method
doSubscribe
doSubscribe handles the subscription logic and is utilized by the public Subscribe functions
event_bus.go:62
↓ 3 callers
Method
Register
Register - Registers a remote handler to this event bus for a remote subscribe - a given client address only needs to subscribe once event will be rep
server.go:132
↓ 2 callers
Method
EventBus
EventBus - returns wrapped event bus
network_bus.go:36
↓ 2 callers
Function
NewNetworkBus
NewNetworkBus - returns a new network bus object at the server address and path
network_bus.go:24
↓ 2 callers
Method
Start
Start - starts a service for remote clients to subscribe to events
server.go:92
↓ 2 callers
Method
Start
Start - helper method to serve a network bus service
network_bus.go:47
↓ 2 callers
Method
Start
Start - starts the client service to listen to remote events
client.go:80
↓ 2 callers
Method
Stop
Stop - signal for the service to stop serving
server.go:114
↓ 2 callers
Method
Stop
Stop - signal for the service to stop serving
network_bus.go:70
↓ 2 callers
Method
Stop
Stop - signal for the service to stop serving
client.go:100
↓ 2 callers
Method
SubscribeAsync
(topic string, fn interface{}, transactional bool)
event_bus.go:12
↓ 2 callers
Method
doPublish
(handler *eventHandler, topic string, args ...interface{})
event_bus.go:158
↓ 2 callers
Method
doSubscribe
(topic string, fn interface{}, serverAddr, serverPath string, subscribeType SubscribeType)
client.go:46
↓ 2 callers
Method
removeHandler
(topic string, idx int)
event_bus.go:171
↓ 1 callers
Method
EventBus
EventBus - returns wrapped event bus
server.go:57
↓ 1 callers
Method
HasClientSubscribed
HasClientSubscribed - True if a client subscribed to this server with the same topic
server.go:80
↓ 1 callers
Method
PushEvent
PushEvent - exported service to listening to remote events
client.go:116
↓ 1 callers
Method
Subscribe
Subscribe subscribes to a topic in a remote event bus
client.go:70
↓ 1 callers
Method
SubscribeOnceAsync
(topic string, fn interface{})
event_bus.go:14
↓ 1 callers
Method
doPublishAsync
(handler *eventHandler, topic string, args ...interface{})
event_bus.go:163
↓ 1 callers
Method
findHandlerIdx
(topic string, callback reflect.Value)
event_bus.go:186
↓ 1 callers
Method
rpcCallback
(subscribeArg *SubscribeArg)
server.go:61
↓ 1 callers
Method
setUpPublish
(callback *eventHandler, args ...interface{})
event_bus.go:198
Method
EventBus
EventBus - returns the underlying event bus
client.go:42
Method
Handle
()
event_bus_test.go:78
Method
HasCallback
HasCallback returns true if exists any callback subscribed to the topic.
event_bus.go:108
Method
Publish
Publish executes callback defined for a topic. Any additional argument will be transferred to the callback.
event_bus.go:131
Method
Subscribe
Subscribe subscribes to a topic. Returns error if `fn` is not a function.
event_bus.go:74
Method
SubscribeAsync
SubscribeAsync subscribes to a topic with an asynchronous callback Transactional determines whether subsequent callbacks for a topic are run serially
event_bus.go:84
Method
SubscribeOnce
SubscribeOnce subscribes to a topic once. Handler will be removed after executing. Returns error if `fn` is not a function.
event_bus.go:92
Method
SubscribeOnce
SubscribeOnce subscribes once to a topic in a remote event bus
client.go:75
Method
SubscribeOnceAsync
SubscribeOnceAsync subscribes to a topic once with an asynchronous callback Handler will be removed after executing. Returns error if `fn` is not a fu
event_bus.go:101
Function
TestHasCallback
(t *testing.T)
event_bus_test.go:16
Function
TestNetworkBus
(t *testing.T)
network_bus_test.go:87
Function
TestNew
(t *testing.T)
event_bus_test.go:8
Function
TestNewClient
(t *testing.T)
network_bus_test.go:17
Function
TestNewServer
(t *testing.T)
network_bus_test.go:7
Function
TestPublish
(t *testing.T)
event_bus_test.go:102
Function
TestPushEvent
(t *testing.T)
network_bus_test.go:44
Function
TestRegister
(t *testing.T)
network_bus_test.go:27
Function
TestServerPublish
(t *testing.T)
network_bus_test.go:66
Function
TestSubcribeOnceAsync
(t *testing.T)
event_bus_test.go:116
Function
TestSubscribe
(t *testing.T)
event_bus_test.go:27
Function
TestSubscribeAsync
(t *testing.T)
event_bus_test.go:162
Function
TestSubscribeAsyncTransactional
(t *testing.T)
event_bus_test.go:138
Function
TestSubscribeOnce
(t *testing.T)
event_bus_test.go:37
Function
TestSubscribeOnceAndManySubscribe
(t *testing.T)
event_bus_test.go:47
Function
TestUnsubscribe
(t *testing.T)
event_bus_test.go:62
Function
TestUnsubscribeMethod
(t *testing.T)
event_bus_test.go:82
Method
Unsubscribe
Unsubscribe removes callback defined for a topic. Returns error if there are no callbacks subscribed to the topic.
event_bus.go:120
Method
WaitAsync
WaitAsync waits for all async callbacks to complete
event_bus.go:213