diff --git a/api/router.go b/api/router.go index 98317dd..30f380a 100644 --- a/api/router.go +++ b/api/router.go @@ -21,7 +21,7 @@ type RouteRegistrar interface { // mux := http.NewServeMux() // api.RegisterRoutes(mux, p) -// GET /1/summary, /1/workers, and /1/miners +// The mounted routes are GET /1/summary, /1/workers, and /1/miners. func RegisterRoutes(router RouteRegistrar, p *proxy.Proxy) { if router == nil || p == nil { return diff --git a/core_impl.go b/core_impl.go index e5c54a7..4dd9367 100644 --- a/core_impl.go +++ b/core_impl.go @@ -123,7 +123,7 @@ func NewEventBus() *EventBus { return &EventBus{listeners: make(map[EventType][]EventHandler)} } -// Subscribe registers a handler for the given event type. +// bus.Subscribe(proxy.EventAccept, stats.OnAccept) func (b *EventBus) Subscribe(t EventType, h EventHandler) { if b == nil || h == nil { return @@ -136,7 +136,7 @@ func (b *EventBus) Subscribe(t EventType, h EventHandler) { b.listeners[t] = append(b.listeners[t], h) } -// Dispatch calls all registered handlers for the event's type. +// bus.Dispatch(proxy.Event{Type: proxy.EventLogin, Miner: miner}) func (b *EventBus) Dispatch(e Event) { if b == nil { return