Move callInfo into the right position
This commit is contained in:
Родитель
c1330e18aa
Коммит
ea6e7189de
9
call.go
9
call.go
|
@ -40,7 +40,6 @@ import (
|
||||||
"golang.org/x/net/context"
|
"golang.org/x/net/context"
|
||||||
"golang.org/x/net/trace"
|
"golang.org/x/net/trace"
|
||||||
"google.golang.org/grpc/codes"
|
"google.golang.org/grpc/codes"
|
||||||
"google.golang.org/grpc/metadata"
|
|
||||||
"google.golang.org/grpc/transport"
|
"google.golang.org/grpc/transport"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -94,14 +93,6 @@ func sendRequest(ctx context.Context, codec Codec, callHdr *transport.CallHdr, t
|
||||||
return stream, nil
|
return stream, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// callInfo contains all related configuration and information about an RPC.
|
|
||||||
type callInfo struct {
|
|
||||||
failFast bool
|
|
||||||
headerMD metadata.MD
|
|
||||||
trailerMD metadata.MD
|
|
||||||
traceInfo traceInfo // in trace.go
|
|
||||||
}
|
|
||||||
|
|
||||||
// Invoke is called by the generated code. It sends the RPC request on the
|
// Invoke is called by the generated code. It sends the RPC request on the
|
||||||
// wire and returns after response is received.
|
// wire and returns after response is received.
|
||||||
func Invoke(ctx context.Context, method string, args, reply interface{}, cc *ClientConn, opts ...CallOption) (err error) {
|
func Invoke(ctx context.Context, method string, args, reply interface{}, cc *ClientConn, opts ...CallOption) (err error) {
|
||||||
|
|
|
@ -75,6 +75,14 @@ func (protoCodec) String() string {
|
||||||
return "proto"
|
return "proto"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// callInfo contains all related configuration and information about an RPC.
|
||||||
|
type callInfo struct {
|
||||||
|
failFast bool
|
||||||
|
headerMD metadata.MD
|
||||||
|
trailerMD metadata.MD
|
||||||
|
traceInfo traceInfo // in trace.go
|
||||||
|
}
|
||||||
|
|
||||||
// CallOption configures a Call before it starts or extracts information from
|
// CallOption configures a Call before it starts or extracts information from
|
||||||
// a Call after it completes.
|
// a Call after it completes.
|
||||||
type CallOption interface {
|
type CallOption interface {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче