Skip to content

Commit

Permalink
Merge branch 'feature/grpc-router' of gitlab.eolink.com:goku/eosc int…
Browse files Browse the repository at this point in the history
…o feature/dubbo
  • Loading branch information
zhangzeyi committed Feb 14, 2023
2 parents ea476ca + c1fd4d7 commit 74b6bb6
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions eocontext/grpc-context/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"github.com/eolinker/eosc/eocontext"
"github.com/jhump/protoreflect/desc"
"github.com/jhump/protoreflect/dynamic"
"google.golang.org/grpc"
"google.golang.org/grpc/metadata"
)

Expand All @@ -28,6 +27,7 @@ type IGrpcContext interface {
InsecureCertificateVerify(bool)
// Invoke grpc调用
Invoke(address string, timeout time.Duration) error
FastFinish() error
}

type IRequest interface {
Expand All @@ -38,15 +38,18 @@ type IRequest interface {
Method() string
SetMethod(string)
FullMethodName() string
RealIP() string
ForwardIP() string
// Message 获取原始请求内容,在grpc协议需要转其他协议时使用
Message(*desc.MessageDescriptor) *dynamic.Message
}

type IResponse interface {
Headers() metadata.MD
Message(*desc.MessageDescriptor) *dynamic.Message
Message() *dynamic.Message
Trailer() metadata.MD
ClientStream() grpc.ClientStream
Write(msg *dynamic.Message)
//ClientStream() grpc.ClientStream
}

type ITrailer interface {
Expand Down

0 comments on commit 74b6bb6

Please sign in to comment.