Add working grpc proxy config

This commit is contained in:
Asim Aslam
2019-06-18 18:51:52 +01:00
committed by Vasiliy Tolstov
parent ac860f37e2
commit 4651f11492
4 changed files with 105 additions and 30 deletions

View File

@@ -2,6 +2,7 @@ package grpc
import (
"github.com/micro/go-micro/codec"
"github.com/micro/go-micro/codec/bytes"
)
type rpcRequest struct {
@@ -46,7 +47,11 @@ func (r *rpcRequest) Header() map[string]string {
}
func (r *rpcRequest) Read() ([]byte, error) {
return r.body, nil
f := &bytes.Frame{}
if err := r.codec.ReadBody(f); err != nil {
return nil, err
}
return f.Data, nil
}
func (r *rpcRequest) Stream() bool {