Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2022-01-24 22:44:26 +03:00
parent 8a71466ba4
commit 88a4c1641d
48 changed files with 200 additions and 137 deletions

View File

@@ -19,8 +19,7 @@ import (
cw "go.unistack.org/micro/v3/util/client"
)
type TestFoo struct {
}
type TestFoo struct{}
type TestReq struct{}

View File

@@ -1,8 +1,8 @@
// +build ignore
/*
package drpc
/*
import (
"context"
"net"

View File

@@ -7,10 +7,11 @@
package pb
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
@@ -146,11 +147,14 @@ func file_test_proto_rawDescGZIP() []byte {
return file_test_proto_rawDescData
}
var file_test_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_test_proto_goTypes = []interface{}{
(*CallReq)(nil), // 0: Test.CallReq
(*CallRsp)(nil), // 1: Test.CallRsp
}
var (
file_test_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
file_test_proto_goTypes = []interface{}{
(*CallReq)(nil), // 0: Test.CallReq
(*CallRsp)(nil), // 1: Test.CallRsp
}
)
var file_test_proto_depIdxs = []int32{
0, // 0: Test.TestService.Call:input_type -> Test.CallReq
0, // 1: Test.TestService.Hello:input_type -> Test.CallReq

View File

@@ -7,6 +7,7 @@ package pb
import (
context "context"
errors "errors"
proto "google.golang.org/protobuf/proto"
drpc "storj.io/drpc"
drpcerr "storj.io/drpc/drpcerr"

View File

@@ -6,6 +6,7 @@ package pb
import (
context "context"
api "go.unistack.org/micro/v3/api"
client "go.unistack.org/micro/v3/client"
)

View File

@@ -6,6 +6,7 @@ package pb
import (
context "context"
api "go.unistack.org/micro/v3/api"
client "go.unistack.org/micro/v3/client"
server "go.unistack.org/micro/v3/server"

View File

@@ -6,6 +6,7 @@ package helloworld
import (
context "context"
proto "go.unistack.org/micro-tests/client/grpc/proto"
api "go.unistack.org/micro/v3/api"
client "go.unistack.org/micro/v3/client"

View File

@@ -6,6 +6,7 @@ package helloworld
import (
context "context"
proto "go.unistack.org/micro-tests/client/grpc/proto"
api "go.unistack.org/micro/v3/api"
client "go.unistack.org/micro/v3/client"

View File

@@ -7,10 +7,11 @@
package helloworld
import (
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
)
const (
@@ -158,11 +159,14 @@ func file_test_proto_rawDescGZIP() []byte {
return file_test_proto_rawDescData
}
var file_test_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
var file_test_proto_goTypes = []interface{}{
(*Request)(nil), // 0: helloworld.Request
(*Response)(nil), // 1: helloworld.Response
}
var (
file_test_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
file_test_proto_goTypes = []interface{}{
(*Request)(nil), // 0: helloworld.Request
(*Response)(nil), // 1: helloworld.Response
}
)
var file_test_proto_depIdxs = []int32{
0, // 0: helloworld.Test.Call:input_type -> helloworld.Request
0, // 1: helloworld.Test.Stream:input_type -> helloworld.Request

View File

@@ -8,6 +8,7 @@ package helloworld
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
@@ -84,12 +85,12 @@ type TestServer interface {
}
// UnimplementedTestServer must be embedded to have forward compatible implementations.
type UnimplementedTestServer struct {
}
type UnimplementedTestServer struct{}
func (UnimplementedTestServer) Call(context.Context, *Request) (*Response, error) {
return nil, status.Errorf(codes.Unimplemented, "method Call not implemented")
}
func (UnimplementedTestServer) Stream(Test_StreamServer) error {
return status.Errorf(codes.Unimplemented, "method Stream not implemented")
}

View File

@@ -244,7 +244,7 @@ func TestHTTPClientStream(t *testing.T) {
// write response
rsp := &http.Response{
Header: r.Header,
// Header: r.Header,
Body: ioutil.NopCloser(bytes.NewBuffer(b)),
Status: "200 OK",
StatusCode: 200,

View File

@@ -7,12 +7,13 @@
package pb
import (
reflect "reflect"
sync "sync"
_ "go.unistack.org/micro-proto/v3/api"
_ "go.unistack.org/micro-proto/v3/openapiv3"
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
)
const (
@@ -225,12 +226,15 @@ func file_github_proto_rawDescGZIP() []byte {
return file_github_proto_rawDescData
}
var file_github_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
var file_github_proto_goTypes = []interface{}{
(*LookupUserReq)(nil), // 0: github.LookupUserReq
(*LookupUserRsp)(nil), // 1: github.LookupUserRsp
(*Error)(nil), // 2: github.Error
}
var (
file_github_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
file_github_proto_goTypes = []interface{}{
(*LookupUserReq)(nil), // 0: github.LookupUserReq
(*LookupUserRsp)(nil), // 1: github.LookupUserRsp
(*Error)(nil), // 2: github.Error
}
)
var file_github_proto_depIdxs = []int32{
0, // 0: github.Github.LookupUser:input_type -> github.LookupUserReq
0, // 1: github.Github.LookupUserWithoutPath:input_type -> github.LookupUserReq

View File

@@ -6,6 +6,7 @@ package pb
import (
context "context"
api "go.unistack.org/micro/v3/api"
client "go.unistack.org/micro/v3/client"
)

View File

@@ -6,11 +6,12 @@ package pb
import (
context "context"
http "net/http"
v3 "go.unistack.org/micro-client-http/v3"
api "go.unistack.org/micro/v3/api"
client "go.unistack.org/micro/v3/client"
server "go.unistack.org/micro/v3/server"
http "net/http"
)
type githubClient struct {