1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-05-31 21:59:42 +02:00

strip grpc

This commit is contained in:
Asim Aslam 2020-12-30 08:21:30 +00:00
parent 18fb7a5d62
commit eb1e22bd10
6 changed files with 72 additions and 417 deletions

3
go.mod
View File

@ -8,6 +8,7 @@ require (
github.com/BurntSushi/toml v0.3.1
github.com/bitly/go-simplejson v0.5.0
github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
github.com/ef-ds/deque v1.0.4-0.20190904040645-54cb57c252a1
github.com/evanphx/json-patch/v5 v5.0.0
github.com/fsnotify/fsnotify v1.4.9
@ -34,5 +35,5 @@ require (
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9
golang.org/x/net v0.0.0-20200707034311-ab3426394381
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a
google.golang.org/grpc v1.26.0
google.golang.org/grpc v1.26.0 // indirect
)

2
go.sum
View File

@ -95,6 +95,8 @@ github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7
github.com/cpu/goacmedns v0.0.1/go.mod h1:sesf/pNnCYwUevQEQfEwY0Y3DydlQWSGZbaMElOWxok=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d h1:U+s90UTSYgptZMwQh2aRr3LuazLJIa+Pg3Kc1ylSYVY=
github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/cpuguy83/go-md2man/v2 v2.0.0 h1:EoUDS0afbrsXAZ9YQ9jdu/mZ2sXgT1/2yyNng4PGlyM=
github.com/cpuguy83/go-md2man/v2 v2.0.0/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=

View File

@ -1,15 +1,11 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: server/proto/server.proto
// source: server.proto
package go_micro_server
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
)
@ -37,7 +33,7 @@ func (m *HandleRequest) Reset() { *m = HandleRequest{} }
func (m *HandleRequest) String() string { return proto.CompactTextString(m) }
func (*HandleRequest) ProtoMessage() {}
func (*HandleRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_1959cecd4d1121a1, []int{0}
return fileDescriptor_ad098daeda4239f7, []int{0}
}
func (m *HandleRequest) XXX_Unmarshal(b []byte) error {
@ -89,7 +85,7 @@ func (m *HandleResponse) Reset() { *m = HandleResponse{} }
func (m *HandleResponse) String() string { return proto.CompactTextString(m) }
func (*HandleResponse) ProtoMessage() {}
func (*HandleResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_1959cecd4d1121a1, []int{1}
return fileDescriptor_ad098daeda4239f7, []int{1}
}
func (m *HandleResponse) XXX_Unmarshal(b []byte) error {
@ -121,7 +117,7 @@ func (m *SubscribeRequest) Reset() { *m = SubscribeRequest{} }
func (m *SubscribeRequest) String() string { return proto.CompactTextString(m) }
func (*SubscribeRequest) ProtoMessage() {}
func (*SubscribeRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_1959cecd4d1121a1, []int{2}
return fileDescriptor_ad098daeda4239f7, []int{2}
}
func (m *SubscribeRequest) XXX_Unmarshal(b []byte) error {
@ -159,7 +155,7 @@ func (m *SubscribeResponse) Reset() { *m = SubscribeResponse{} }
func (m *SubscribeResponse) String() string { return proto.CompactTextString(m) }
func (*SubscribeResponse) ProtoMessage() {}
func (*SubscribeResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_1959cecd4d1121a1, []int{3}
return fileDescriptor_ad098daeda4239f7, []int{3}
}
func (m *SubscribeResponse) XXX_Unmarshal(b []byte) error {
@ -187,138 +183,22 @@ func init() {
proto.RegisterType((*SubscribeResponse)(nil), "go.micro.server.SubscribeResponse")
}
func init() { proto.RegisterFile("server/proto/server.proto", fileDescriptor_1959cecd4d1121a1) }
func init() { proto.RegisterFile("server.proto", fileDescriptor_ad098daeda4239f7) }
var fileDescriptor_1959cecd4d1121a1 = []byte{
// 223 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2c, 0x4e, 0x2d, 0x2a,
0x4b, 0x2d, 0xd2, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0xd7, 0x87, 0x70, 0xf4, 0xc0, 0x1c, 0x21, 0xfe,
0xf4, 0x7c, 0xbd, 0xdc, 0xcc, 0xe4, 0xa2, 0x7c, 0x3d, 0x88, 0xb0, 0x52, 0x22, 0x17, 0xaf, 0x47,
0x62, 0x5e, 0x4a, 0x4e, 0x6a, 0x50, 0x6a, 0x61, 0x69, 0x6a, 0x71, 0x89, 0x90, 0x04, 0x17, 0x3b,
0x48, 0x2a, 0x33, 0x39, 0x55, 0x82, 0x51, 0x81, 0x51, 0x83, 0x33, 0x08, 0xc6, 0x15, 0x92, 0xe2,
0xe2, 0x48, 0xcd, 0x4b, 0x29, 0xc8, 0xcf, 0xcc, 0x2b, 0x91, 0x60, 0x02, 0x4b, 0xc1, 0xf9, 0x20,
0x39, 0xb0, 0x05, 0xc9, 0xf9, 0x39, 0x12, 0xcc, 0x10, 0x39, 0x18, 0x5f, 0x49, 0x80, 0x8b, 0x0f,
0x66, 0x45, 0x71, 0x41, 0x7e, 0x5e, 0x71, 0xaa, 0x92, 0x06, 0x97, 0x40, 0x70, 0x69, 0x52, 0x71,
0x72, 0x51, 0x66, 0x12, 0xdc, 0x5e, 0x11, 0x2e, 0xd6, 0x92, 0xfc, 0x82, 0xcc, 0x64, 0xa8, 0xad,
0x10, 0x8e, 0x92, 0x30, 0x97, 0x20, 0x92, 0x4a, 0x88, 0x76, 0xa3, 0xd5, 0x8c, 0x5c, 0x6c, 0xc1,
0x60, 0xe7, 0x0b, 0x79, 0x73, 0xb1, 0x41, 0xcc, 0x16, 0x92, 0xd3, 0x43, 0xf3, 0x9a, 0x1e, 0x8a,
0xbf, 0xa4, 0xe4, 0x71, 0xca, 0x43, 0x1d, 0xc5, 0x20, 0x14, 0xc2, 0xc5, 0x09, 0xb7, 0x4c, 0x48,
0x11, 0x43, 0x3d, 0xba, 0x93, 0xa5, 0x94, 0xf0, 0x29, 0x81, 0x99, 0x9a, 0xc4, 0x06, 0x0e, 0x08,
0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa4, 0x3f, 0x79, 0x80, 0x96, 0x01, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// ServerClient is the client API for Server service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ServerClient interface {
Handle(ctx context.Context, in *HandleRequest, opts ...grpc.CallOption) (*HandleResponse, error)
Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (*SubscribeResponse, error)
}
type serverClient struct {
cc *grpc.ClientConn
}
func NewServerClient(cc *grpc.ClientConn) ServerClient {
return &serverClient{cc}
}
func (c *serverClient) Handle(ctx context.Context, in *HandleRequest, opts ...grpc.CallOption) (*HandleResponse, error) {
out := new(HandleResponse)
err := c.cc.Invoke(ctx, "/go.micro.server.Server/Handle", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *serverClient) Subscribe(ctx context.Context, in *SubscribeRequest, opts ...grpc.CallOption) (*SubscribeResponse, error) {
out := new(SubscribeResponse)
err := c.cc.Invoke(ctx, "/go.micro.server.Server/Subscribe", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// ServerServer is the server API for Server service.
type ServerServer interface {
Handle(context.Context, *HandleRequest) (*HandleResponse, error)
Subscribe(context.Context, *SubscribeRequest) (*SubscribeResponse, error)
}
// UnimplementedServerServer can be embedded to have forward compatible implementations.
type UnimplementedServerServer struct {
}
func (*UnimplementedServerServer) Handle(ctx context.Context, req *HandleRequest) (*HandleResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Handle not implemented")
}
func (*UnimplementedServerServer) Subscribe(ctx context.Context, req *SubscribeRequest) (*SubscribeResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Subscribe not implemented")
}
func RegisterServerServer(s *grpc.Server, srv ServerServer) {
s.RegisterService(&_Server_serviceDesc, srv)
}
func _Server_Handle_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(HandleRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ServerServer).Handle(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/go.micro.server.Server/Handle",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ServerServer).Handle(ctx, req.(*HandleRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Server_Subscribe_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SubscribeRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(ServerServer).Subscribe(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/go.micro.server.Server/Subscribe",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(ServerServer).Subscribe(ctx, req.(*SubscribeRequest))
}
return interceptor(ctx, in, info, handler)
}
var _Server_serviceDesc = grpc.ServiceDesc{
ServiceName: "go.micro.server.Server",
HandlerType: (*ServerServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Handle",
Handler: _Server_Handle_Handler,
},
{
MethodName: "Subscribe",
Handler: _Server_Subscribe_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "server/proto/server.proto",
var fileDescriptor_ad098daeda4239f7 = []byte{
// 217 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x29, 0x4e, 0x2d, 0x2a,
0x4b, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x4f, 0xcf, 0xd7, 0xcb, 0xcd, 0x4c,
0x2e, 0xca, 0xd7, 0x83, 0x08, 0x2b, 0x25, 0x72, 0xf1, 0x7a, 0x24, 0xe6, 0xa5, 0xe4, 0xa4, 0x06,
0xa5, 0x16, 0x96, 0xa6, 0x16, 0x97, 0x08, 0x49, 0x70, 0xb1, 0x83, 0xa4, 0x32, 0x93, 0x53, 0x25,
0x18, 0x15, 0x18, 0x35, 0x38, 0x83, 0x60, 0x5c, 0x21, 0x29, 0x2e, 0x8e, 0xd4, 0xbc, 0x94, 0x82,
0xfc, 0xcc, 0xbc, 0x12, 0x09, 0x26, 0xb0, 0x14, 0x9c, 0x0f, 0x92, 0x03, 0x5b, 0x90, 0x9c, 0x9f,
0x23, 0xc1, 0x0c, 0x91, 0x83, 0xf1, 0x95, 0x04, 0xb8, 0xf8, 0x60, 0x56, 0x14, 0x17, 0xe4, 0xe7,
0x15, 0xa7, 0x2a, 0x69, 0x70, 0x09, 0x04, 0x97, 0x26, 0x15, 0x27, 0x17, 0x65, 0x26, 0xc1, 0xed,
0x15, 0xe1, 0x62, 0x2d, 0xc9, 0x2f, 0xc8, 0x4c, 0x86, 0xda, 0x0a, 0xe1, 0x28, 0x09, 0x73, 0x09,
0x22, 0xa9, 0x84, 0x68, 0x37, 0x5a, 0xcd, 0xc8, 0xc5, 0x16, 0x0c, 0x76, 0xbe, 0x90, 0x37, 0x17,
0x1b, 0xc4, 0x6c, 0x21, 0x39, 0x3d, 0x34, 0xaf, 0xe9, 0xa1, 0xf8, 0x4b, 0x4a, 0x1e, 0xa7, 0x3c,
0xd4, 0x51, 0x0c, 0x42, 0x21, 0x5c, 0x9c, 0x70, 0xcb, 0x84, 0x14, 0x31, 0xd4, 0xa3, 0x3b, 0x59,
0x4a, 0x09, 0x9f, 0x12, 0x98, 0xa9, 0x49, 0x6c, 0xe0, 0x80, 0x30, 0x06, 0x04, 0x00, 0x00, 0xff,
0xff, 0xe0, 0x77, 0x9a, 0xe4, 0x89, 0x01, 0x00, 0x00,
}

View File

@ -1,5 +1,5 @@
// Code generated by protoc-gen-micro. DO NOT EDIT.
// source: server/proto/server.proto
// source: server.proto
package go_micro_server

View File

@ -1,15 +1,11 @@
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: util/file/proto/file.proto
// source: file.proto
package go_micro_server
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
math "math"
)
@ -36,7 +32,7 @@ func (m *OpenRequest) Reset() { *m = OpenRequest{} }
func (m *OpenRequest) String() string { return proto.CompactTextString(m) }
func (*OpenRequest) ProtoMessage() {}
func (*OpenRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_c90a6c4a93f92bf4, []int{0}
return fileDescriptor_9188e3b7e55e1162, []int{0}
}
func (m *OpenRequest) XXX_Unmarshal(b []byte) error {
@ -83,7 +79,7 @@ func (m *OpenResponse) Reset() { *m = OpenResponse{} }
func (m *OpenResponse) String() string { return proto.CompactTextString(m) }
func (*OpenResponse) ProtoMessage() {}
func (*OpenResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_c90a6c4a93f92bf4, []int{1}
return fileDescriptor_9188e3b7e55e1162, []int{1}
}
func (m *OpenResponse) XXX_Unmarshal(b []byte) error {
@ -129,7 +125,7 @@ func (m *CloseRequest) Reset() { *m = CloseRequest{} }
func (m *CloseRequest) String() string { return proto.CompactTextString(m) }
func (*CloseRequest) ProtoMessage() {}
func (*CloseRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_c90a6c4a93f92bf4, []int{2}
return fileDescriptor_9188e3b7e55e1162, []int{2}
}
func (m *CloseRequest) XXX_Unmarshal(b []byte) error {
@ -167,7 +163,7 @@ func (m *CloseResponse) Reset() { *m = CloseResponse{} }
func (m *CloseResponse) String() string { return proto.CompactTextString(m) }
func (*CloseResponse) ProtoMessage() {}
func (*CloseResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_c90a6c4a93f92bf4, []int{3}
return fileDescriptor_9188e3b7e55e1162, []int{3}
}
func (m *CloseResponse) XXX_Unmarshal(b []byte) error {
@ -199,7 +195,7 @@ func (m *StatRequest) Reset() { *m = StatRequest{} }
func (m *StatRequest) String() string { return proto.CompactTextString(m) }
func (*StatRequest) ProtoMessage() {}
func (*StatRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_c90a6c4a93f92bf4, []int{4}
return fileDescriptor_9188e3b7e55e1162, []int{4}
}
func (m *StatRequest) XXX_Unmarshal(b []byte) error {
@ -240,7 +236,7 @@ func (m *StatResponse) Reset() { *m = StatResponse{} }
func (m *StatResponse) String() string { return proto.CompactTextString(m) }
func (*StatResponse) ProtoMessage() {}
func (*StatResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_c90a6c4a93f92bf4, []int{5}
return fileDescriptor_9188e3b7e55e1162, []int{5}
}
func (m *StatResponse) XXX_Unmarshal(b []byte) error {
@ -295,7 +291,7 @@ func (m *ReadRequest) Reset() { *m = ReadRequest{} }
func (m *ReadRequest) String() string { return proto.CompactTextString(m) }
func (*ReadRequest) ProtoMessage() {}
func (*ReadRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_c90a6c4a93f92bf4, []int{6}
return fileDescriptor_9188e3b7e55e1162, []int{6}
}
func (m *ReadRequest) XXX_Unmarshal(b []byte) error {
@ -350,7 +346,7 @@ func (m *ReadResponse) Reset() { *m = ReadResponse{} }
func (m *ReadResponse) String() string { return proto.CompactTextString(m) }
func (*ReadResponse) ProtoMessage() {}
func (*ReadResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_c90a6c4a93f92bf4, []int{7}
return fileDescriptor_9188e3b7e55e1162, []int{7}
}
func (m *ReadResponse) XXX_Unmarshal(b []byte) error {
@ -404,7 +400,7 @@ func (m *GetRequest) Reset() { *m = GetRequest{} }
func (m *GetRequest) String() string { return proto.CompactTextString(m) }
func (*GetRequest) ProtoMessage() {}
func (*GetRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_c90a6c4a93f92bf4, []int{8}
return fileDescriptor_9188e3b7e55e1162, []int{8}
}
func (m *GetRequest) XXX_Unmarshal(b []byte) error {
@ -452,7 +448,7 @@ func (m *GetResponse) Reset() { *m = GetResponse{} }
func (m *GetResponse) String() string { return proto.CompactTextString(m) }
func (*GetResponse) ProtoMessage() {}
func (*GetResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_c90a6c4a93f92bf4, []int{9}
return fileDescriptor_9188e3b7e55e1162, []int{9}
}
func (m *GetResponse) XXX_Unmarshal(b []byte) error {
@ -507,7 +503,7 @@ func (m *WriteRequest) Reset() { *m = WriteRequest{} }
func (m *WriteRequest) String() string { return proto.CompactTextString(m) }
func (*WriteRequest) ProtoMessage() {}
func (*WriteRequest) Descriptor() ([]byte, []int) {
return fileDescriptor_c90a6c4a93f92bf4, []int{10}
return fileDescriptor_9188e3b7e55e1162, []int{10}
}
func (m *WriteRequest) XXX_Unmarshal(b []byte) error {
@ -559,7 +555,7 @@ func (m *WriteResponse) Reset() { *m = WriteResponse{} }
func (m *WriteResponse) String() string { return proto.CompactTextString(m) }
func (*WriteResponse) ProtoMessage() {}
func (*WriteResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_c90a6c4a93f92bf4, []int{11}
return fileDescriptor_9188e3b7e55e1162, []int{11}
}
func (m *WriteResponse) XXX_Unmarshal(b []byte) error {
@ -595,260 +591,36 @@ func init() {
proto.RegisterType((*WriteResponse)(nil), "go.micro.server.WriteResponse")
}
func init() { proto.RegisterFile("util/file/proto/file.proto", fileDescriptor_c90a6c4a93f92bf4) }
func init() { proto.RegisterFile("file.proto", fileDescriptor_9188e3b7e55e1162) }
var fileDescriptor_c90a6c4a93f92bf4 = []byte{
// 447 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xcf, 0x8e, 0xd3, 0x30,
0x10, 0xc6, 0x9b, 0x3f, 0x2c, 0x61, 0x92, 0x52, 0xe4, 0x03, 0x2a, 0x11, 0xac, 0x56, 0xe6, 0xb2,
0x5c, 0xb2, 0x12, 0x48, 0xf0, 0x00, 0x68, 0x61, 0x17, 0x09, 0x81, 0xcc, 0x81, 0x03, 0x87, 0x55,
0xb6, 0x9e, 0x20, 0x8b, 0x34, 0x0e, 0xb1, 0x83, 0x04, 0x2f, 0xcd, 0x2b, 0x20, 0x3b, 0x6e, 0xeb,
0xb6, 0x89, 0x84, 0xf6, 0x36, 0xe3, 0x19, 0xff, 0xfc, 0xd9, 0xf9, 0x26, 0x90, 0xf7, 0x5a, 0xd4,
0x17, 0x95, 0xa8, 0xf1, 0xa2, 0xed, 0xa4, 0x96, 0x36, 0x2c, 0x6c, 0x48, 0x16, 0xdf, 0x65, 0xb1,
0x16, 0xab, 0x4e, 0x16, 0x0a, 0xbb, 0x5f, 0xd8, 0xd1, 0x4b, 0x48, 0x3f, 0xb5, 0xd8, 0x30, 0xfc,
0xd9, 0xa3, 0xd2, 0x24, 0x87, 0xc4, 0x74, 0x37, 0xe5, 0x1a, 0x97, 0xc1, 0x59, 0x70, 0xfe, 0x80,
0x6d, 0x73, 0x53, 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xcf, 0x90, 0xda, 0x8d, 0x4e, 0x81,
0xdf, 0x19, 0xec, 0x75, 0x8e, 0x3e, 0xd8, 0x46, 0x5c, 0xb4, 0x13, 0x47, 0x3f, 0x40, 0xf6, 0xb5,
0x13, 0x1a, 0xef, 0xf0, 0x40, 0x47, 0xac, 0x05, 0xcc, 0x1d, 0x6b, 0xd0, 0xf7, 0xf2, 0x6f, 0x08,
0xf1, 0x3b, 0x51, 0x23, 0xb9, 0x84, 0xd8, 0xd8, 0x8e, 0x3c, 0x2d, 0x0e, 0x7c, 0x5d, 0x78, 0xa6,
0xce, 0x9f, 0x4d, 0x54, 0x9d, 0xa5, 0x66, 0x06, 0x63, 0x9c, 0x32, 0x82, 0xf1, 0xbc, 0x36, 0x82,
0xf1, 0xed, 0x35, 0x60, 0xcc, 0x87, 0x1c, 0xc1, 0x78, 0x56, 0x19, 0xc1, 0xf8, 0x5f, 0x9f, 0xce,
0xc8, 0x15, 0xdc, 0xb3, 0xd7, 0x25, 0xc7, 0x9d, 0xfe, 0x93, 0xe6, 0xa7, 0x53, 0x65, 0x9f, 0x64,
0xa7, 0x67, 0x84, 0xe4, 0x4f, 0xdd, 0x08, 0x69, 0x7f, 0xe8, 0x66, 0xb7, 0x27, 0xf6, 0xf7, 0xf1,
0xea, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xaf, 0x08, 0x7e, 0x74, 0x5c, 0x04, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// FileClient is the client API for File service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type FileClient interface {
Open(ctx context.Context, in *OpenRequest, opts ...grpc.CallOption) (*OpenResponse, error)
Stat(ctx context.Context, in *StatRequest, opts ...grpc.CallOption) (*StatResponse, error)
Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error)
Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error)
Close(ctx context.Context, in *CloseRequest, opts ...grpc.CallOption) (*CloseResponse, error)
}
type fileClient struct {
cc *grpc.ClientConn
}
func NewFileClient(cc *grpc.ClientConn) FileClient {
return &fileClient{cc}
}
func (c *fileClient) Open(ctx context.Context, in *OpenRequest, opts ...grpc.CallOption) (*OpenResponse, error) {
out := new(OpenResponse)
err := c.cc.Invoke(ctx, "/go.micro.server.File/Open", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fileClient) Stat(ctx context.Context, in *StatRequest, opts ...grpc.CallOption) (*StatResponse, error) {
out := new(StatResponse)
err := c.cc.Invoke(ctx, "/go.micro.server.File/Stat", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fileClient) Read(ctx context.Context, in *ReadRequest, opts ...grpc.CallOption) (*ReadResponse, error) {
out := new(ReadResponse)
err := c.cc.Invoke(ctx, "/go.micro.server.File/Read", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fileClient) Write(ctx context.Context, in *WriteRequest, opts ...grpc.CallOption) (*WriteResponse, error) {
out := new(WriteResponse)
err := c.cc.Invoke(ctx, "/go.micro.server.File/Write", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *fileClient) Close(ctx context.Context, in *CloseRequest, opts ...grpc.CallOption) (*CloseResponse, error) {
out := new(CloseResponse)
err := c.cc.Invoke(ctx, "/go.micro.server.File/Close", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// FileServer is the server API for File service.
type FileServer interface {
Open(context.Context, *OpenRequest) (*OpenResponse, error)
Stat(context.Context, *StatRequest) (*StatResponse, error)
Read(context.Context, *ReadRequest) (*ReadResponse, error)
Write(context.Context, *WriteRequest) (*WriteResponse, error)
Close(context.Context, *CloseRequest) (*CloseResponse, error)
}
// UnimplementedFileServer can be embedded to have forward compatible implementations.
type UnimplementedFileServer struct {
}
func (*UnimplementedFileServer) Open(ctx context.Context, req *OpenRequest) (*OpenResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Open not implemented")
}
func (*UnimplementedFileServer) Stat(ctx context.Context, req *StatRequest) (*StatResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Stat not implemented")
}
func (*UnimplementedFileServer) Read(ctx context.Context, req *ReadRequest) (*ReadResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Read not implemented")
}
func (*UnimplementedFileServer) Write(ctx context.Context, req *WriteRequest) (*WriteResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Write not implemented")
}
func (*UnimplementedFileServer) Close(ctx context.Context, req *CloseRequest) (*CloseResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method Close not implemented")
}
func RegisterFileServer(s *grpc.Server, srv FileServer) {
s.RegisterService(&_File_serviceDesc, srv)
}
func _File_Open_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(OpenRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileServer).Open(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/go.micro.server.File/Open",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileServer).Open(ctx, req.(*OpenRequest))
}
return interceptor(ctx, in, info, handler)
}
func _File_Stat_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(StatRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileServer).Stat(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/go.micro.server.File/Stat",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileServer).Stat(ctx, req.(*StatRequest))
}
return interceptor(ctx, in, info, handler)
}
func _File_Read_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ReadRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileServer).Read(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/go.micro.server.File/Read",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileServer).Read(ctx, req.(*ReadRequest))
}
return interceptor(ctx, in, info, handler)
}
func _File_Write_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(WriteRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileServer).Write(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/go.micro.server.File/Write",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileServer).Write(ctx, req.(*WriteRequest))
}
return interceptor(ctx, in, info, handler)
}
func _File_Close_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CloseRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FileServer).Close(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/go.micro.server.File/Close",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FileServer).Close(ctx, req.(*CloseRequest))
}
return interceptor(ctx, in, info, handler)
}
var _File_serviceDesc = grpc.ServiceDesc{
ServiceName: "go.micro.server.File",
HandlerType: (*FileServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "Open",
Handler: _File_Open_Handler,
},
{
MethodName: "Stat",
Handler: _File_Stat_Handler,
},
{
MethodName: "Read",
Handler: _File_Read_Handler,
},
{
MethodName: "Write",
Handler: _File_Write_Handler,
},
{
MethodName: "Close",
Handler: _File_Close_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "util/file/proto/file.proto",
var fileDescriptor_9188e3b7e55e1162 = []byte{
// 437 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x94, 0xcd, 0x8e, 0xd3, 0x30,
0x14, 0x85, 0x9b, 0x1f, 0x86, 0x70, 0x93, 0x52, 0xe4, 0x05, 0x2a, 0x15, 0x8c, 0x46, 0x66, 0x33,
0x6c, 0xb2, 0x00, 0x09, 0x1e, 0x00, 0x15, 0x5a, 0x24, 0x04, 0x32, 0x0b, 0x16, 0x2c, 0xaa, 0xb4,
0xbe, 0x41, 0x16, 0x69, 0x1c, 0x62, 0x17, 0x09, 0x5e, 0x9a, 0x57, 0x40, 0x76, 0xdc, 0xd6, 0x6d,
0x13, 0x09, 0xcd, 0xce, 0xd7, 0xf7, 0xf8, 0xf3, 0xb1, 0x73, 0x1c, 0x80, 0x52, 0x54, 0x98, 0x37,
0xad, 0xd4, 0x92, 0x4c, 0xbe, 0xcb, 0x7c, 0x2b, 0x36, 0xad, 0xcc, 0x15, 0xb6, 0xbf, 0xb0, 0xa5,
0x73, 0x48, 0x3f, 0x35, 0x58, 0x33, 0xfc, 0xb9, 0x43, 0xa5, 0xc9, 0x0c, 0x12, 0xa3, 0xae, 0x8b,
0x2d, 0x4e, 0x83, 0x9b, 0xe0, 0xf6, 0x01, 0x3b, 0xd4, 0xa6, 0xa7, 0xdb, 0x5d, 0xbd, 0x29, 0x34,
0x4e, 0xc3, 0x9b, 0xe0, 0x36, 0x61, 0x87, 0x9a, 0xbe, 0x86, 0xac, 0xc3, 0xa8, 0x46, 0xd6, 0x0a,
0xc9, 0x43, 0x08, 0x05, 0xb7, 0x84, 0x88, 0x85, 0x82, 0x93, 0xc7, 0x70, 0xd5, 0xa2, 0xda, 0x55,
0xda, 0xad, 0x74, 0x15, 0xbd, 0x86, 0xec, 0x6d, 0x25, 0x15, 0xee, 0xf7, 0x3f, 0x5b, 0x47, 0x27,
0x30, 0x76, 0xf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, 0x64, 0x30, 0x26,
0x29, 0x3d, 0x18, 0x2f, 0x6b, 0x3d, 0x18, 0x3f, 0x5e, 0x1d, 0xc6, 0x7c, 0xc8, 0x1e, 0x8c, 0x17,
0x95, 0x1e, 0x8c, 0xff, 0xf5, 0xe9, 0x88, 0x2c, 0xe0, 0x9e, 0x3d, 0x2e, 0xb9, 0x54, 0xfa, 0x57,
0x3a, 0xbb, 0x1e, 0x6a, 0xfb, 0x24, 0xfb, 0x7a, 0x7a, 0x48, 0xfe, 0xab, 0xeb, 0x21, 0x9d, 0x3e,
0xba, 0xd1, 0xfa, 0xca, 0xfe, 0x3e, 0x5e, 0xfd, 0x0b, 0x00, 0x00, 0xff, 0xff, 0x5c, 0xf0, 0x71,
0xa2, 0x4c, 0x04, 0x00, 0x00,
}

View File

@ -1,5 +1,5 @@
// Code generated by protoc-gen-micro. DO NOT EDIT.
// source: util/file/proto/file.proto
// source: file.proto
package go_micro_server