fix: rpc: readd rpc.discover aliases
This commit is contained in:
parent
69d3542ee2
commit
48aa0131bf
@ -34,6 +34,7 @@ func WorkerHandler(authv func(ctx context.Context, token string) ([]auth.Permiss
|
|||||||
}
|
}
|
||||||
|
|
||||||
rpcServer.Register("Filecoin", wapi)
|
rpcServer.Register("Filecoin", wapi)
|
||||||
|
rpcServer.AliasMethod("rpc.discover", "Filecoin.Discover")
|
||||||
|
|
||||||
mux.Handle("/rpc/v0", rpcServer)
|
mux.Handle("/rpc/v0", rpcServer)
|
||||||
mux.Handle("/rpc/streams/v0/push/{uuid}", readerHandler)
|
mux.Handle("/rpc/streams/v0/push/{uuid}", readerHandler)
|
||||||
|
@ -20,6 +20,8 @@ func Handler(a api.Gateway, opts ...jsonrpc.ServerOption) (http.Handler, error)
|
|||||||
serveRpc := func(path string, hnd interface{}) {
|
serveRpc := func(path string, hnd interface{}) {
|
||||||
rpcServer := jsonrpc.NewServer(opts...)
|
rpcServer := jsonrpc.NewServer(opts...)
|
||||||
rpcServer.Register("Filecoin", hnd)
|
rpcServer.Register("Filecoin", hnd)
|
||||||
|
rpcServer.AliasMethod("rpc.discover", "Filecoin.Discover")
|
||||||
|
|
||||||
m.Handle(path, rpcServer)
|
m.Handle(path, rpcServer)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -71,6 +71,7 @@ func FullNodeHandler(a v1api.FullNode, permissioned bool, opts ...jsonrpc.Server
|
|||||||
serveRpc := func(path string, hnd interface{}) {
|
serveRpc := func(path string, hnd interface{}) {
|
||||||
rpcServer := jsonrpc.NewServer(opts...)
|
rpcServer := jsonrpc.NewServer(opts...)
|
||||||
rpcServer.Register("Filecoin", hnd)
|
rpcServer.Register("Filecoin", hnd)
|
||||||
|
rpcServer.AliasMethod("rpc.discover", "Filecoin.Discover")
|
||||||
|
|
||||||
var handler http.Handler = rpcServer
|
var handler http.Handler = rpcServer
|
||||||
if permissioned {
|
if permissioned {
|
||||||
@ -131,6 +132,7 @@ func MinerHandler(a api.StorageMiner, permissioned bool) (http.Handler, error) {
|
|||||||
readerHandler, readerServerOpt := rpcenc.ReaderParamDecoder()
|
readerHandler, readerServerOpt := rpcenc.ReaderParamDecoder()
|
||||||
rpcServer := jsonrpc.NewServer(readerServerOpt)
|
rpcServer := jsonrpc.NewServer(readerServerOpt)
|
||||||
rpcServer.Register("Filecoin", mapi)
|
rpcServer.Register("Filecoin", mapi)
|
||||||
|
rpcServer.AliasMethod("rpc.discover", "Filecoin.Discover")
|
||||||
|
|
||||||
m.Handle("/rpc/v0", rpcServer)
|
m.Handle("/rpc/v0", rpcServer)
|
||||||
m.Handle("/rpc/streams/v0/push/{uuid}", readerHandler)
|
m.Handle("/rpc/streams/v0/push/{uuid}", readerHandler)
|
||||||
|
Loading…
Reference in New Issue
Block a user