fmt a bit
This commit is contained in:
parent
859471aeaf
commit
abe5ce4cfe
@ -76,7 +76,7 @@ var runCmd = &cli.Command{
|
||||
|
||||
ah := &auth.Handler{
|
||||
Verify: minerapi.AuthVerify,
|
||||
Next: rpcServer.ServeHTTP,
|
||||
Next: rpcServer.ServeHTTP,
|
||||
}
|
||||
|
||||
http.Handle("/rpc/v0", ah)
|
||||
|
@ -14,7 +14,7 @@ func serveRPC(a api.FullNode, addr string) error {
|
||||
|
||||
ah := &auth.Handler{
|
||||
Verify: a.AuthVerify,
|
||||
Next: rpcServer.ServeHTTP,
|
||||
Next: rpcServer.ServeHTTP,
|
||||
}
|
||||
|
||||
http.Handle("/rpc/v0", ah)
|
||||
|
@ -67,7 +67,7 @@ type client struct {
|
||||
namespace string
|
||||
|
||||
requests chan clientRequest
|
||||
idCtr int64
|
||||
idCtr int64
|
||||
}
|
||||
|
||||
// NewMergeClient is like NewClient, but allows to specify multiple structs
|
||||
@ -143,7 +143,7 @@ func (c *client) makeOutChan(ctx context.Context, ftyp reflect.Type, valOut int)
|
||||
}
|
||||
|
||||
ch.Send(val.Elem()) // todo: select on ctx is probably a good idea
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return func() reflect.Value { return retVal }, chCtor
|
||||
@ -192,12 +192,12 @@ type rpcFunc struct {
|
||||
ftyp reflect.Type
|
||||
name string
|
||||
|
||||
nout int
|
||||
nout int
|
||||
valOut int
|
||||
errOut int
|
||||
|
||||
hasCtx int
|
||||
retCh bool
|
||||
retCh bool
|
||||
}
|
||||
|
||||
func (fn *rpcFunc) processResponse(resp clientResponse, rval reflect.Value) []reflect.Value {
|
||||
@ -290,8 +290,8 @@ func (c *client) makeRpcFunc(f reflect.StructField) (reflect.Value, error) {
|
||||
|
||||
fun := &rpcFunc{
|
||||
client: c,
|
||||
ftyp: ftyp,
|
||||
name: f.Name,
|
||||
ftyp: ftyp,
|
||||
name: f.Name,
|
||||
}
|
||||
fun.valOut, fun.errOut, fun.nout = processFuncOut(ftyp)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user