blob: a37df9fc97a7d7aa080c85c8b72762c22221fb4a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
package rpc
import (
fmt "fmt"
http "net/http"
)
func New() http.Handler {
mux := http.NewServeMux()
for _, handler := range handlers() {
fmt.Printf("Registering : %v\n", handler.PathPrefix())
mux.Handle(handler.PathPrefix(), handler)
}
return mux
}
func handlers() []TwirpServer {
return []TwirpServer{
NewAbilityServer(NewAbilityService()),
}
}
|