add SendRaw method to send raw rpcx messages

This commit is contained in:
smallnest
2017-12-01 11:45:16 +08:00
parent 90b45d9aff
commit 7b2b73b146
3 changed files with 233 additions and 15 deletions

View File

@@ -2,11 +2,13 @@ package client
import (
"context"
"errors"
"fmt"
"reflect"
"sync"
"github.com/smallnest/rpcx/log"
"github.com/smallnest/rpcx/protocol"
"github.com/smallnest/rpcx/share"
)
@@ -115,6 +117,10 @@ func (client *inprocessClient) Call(ctx context.Context, servicePath, serviceMet
return err
}
func (client *inprocessClient) SendRaw(ctx context.Context, r *protocol.Message) (map[string]string, []byte, error) {
return nil, nil, errors.New("SendRaw method is not supported by inprocessClient")
}
// Close do a fake operaton.
func (client *inprocessClient) Close() error {
return nil