Fixing dead code and go vet moaning

This commit is contained in:
Milos Gajdos
2019-12-05 16:10:49 +00:00
parent 3a10b1cdde
commit 5865e89bed
12 changed files with 5 additions and 19 deletions

View File

@@ -135,8 +135,6 @@ func (p *Proxy) ServeRequest(ctx context.Context, req server.Request, rsp server
return err
}
}
return nil
}
// NewProxy returns a new grpc proxy server

View File

@@ -187,8 +187,6 @@ func (p *Proxy) ServeRequest(ctx context.Context, req server.Request, rsp server
return errors.InternalServerError(req.Service(), err.Error())
}
}
return nil
}
// NewSingleHostProxy returns a router which sends requests to a single http backend

View File

@@ -437,7 +437,7 @@ func (p *Proxy) serveRequest(ctx context.Context, link client.Client, service, e
}
// create new request with raw bytes body
creq := link.NewRequest(service, endpoint, &bytes.Frame{body}, client.WithContentType(req.ContentType()))
creq := link.NewRequest(service, endpoint, &bytes.Frame{Data: body}, client.WithContentType(req.ContentType()))
// not a stream so make a client.Call request
if !req.Stream() {
@@ -493,8 +493,6 @@ func (p *Proxy) serveRequest(ctx context.Context, link client.Client, service, e
return err
}
}
return nil
}
// NewSingleHostProxy returns a proxy which sends requests to a single backend