Skip to content

Commit

Permalink
Move callInfo into the right position
Browse files Browse the repository at this point in the history
  • Loading branch information
iamqizhao committed Jan 7, 2016
1 parent c1330e1 commit ea6e718
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
9 changes: 0 additions & 9 deletions call.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ import (
"golang.org/x/net/context"
"golang.org/x/net/trace"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/transport"
)

Expand Down Expand Up @@ -94,14 +93,6 @@ func sendRequest(ctx context.Context, codec Codec, callHdr *transport.CallHdr, t
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
// wire and returns after response is received.
func Invoke(ctx context.Context, method string, args, reply interface{}, cc *ClientConn, opts ...CallOption) (err error) {
Expand Down
8 changes: 8 additions & 0 deletions rpc_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ func (protoCodec) String() string {
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
// a Call after it completes.
type CallOption interface {
Expand Down

0 comments on commit ea6e718

Please sign in to comment.