docs(proxy): align AX comments
Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
parent
f2f7dfed75
commit
cbde021d0c
2 changed files with 3 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue