From 83d9cf3b5ef4c6eb3bf89be2009b41b2b6b21f99 Mon Sep 17 00:00:00 2001 From: "jackdaw@loafle.com" Date: Fri, 14 Apr 2017 18:30:38 +0900 Subject: [PATCH] . --- grpc/grpc.pb.go | 171 +++++++++++++++++++++++++++++++++++++----------- grpc/grpc.proto | 9 ++- 2 files changed, 141 insertions(+), 39 deletions(-) diff --git a/grpc/grpc.pb.go b/grpc/grpc.pb.go index 8edbc72..faab9c7 100644 --- a/grpc/grpc.pb.go +++ b/grpc/grpc.pb.go @@ -9,6 +9,8 @@ It is generated from these files: grpc.proto It has these top-level messages: + Empty + Boolean InputArray Init Input @@ -144,6 +146,30 @@ func (x Crawlers) String() string { } func (Crawlers) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +type Empty struct { +} + +func (m *Empty) Reset() { *m = Empty{} } +func (m *Empty) String() string { return proto.CompactTextString(m) } +func (*Empty) ProtoMessage() {} +func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } + +type Boolean struct { + Check bool `protobuf:"varint,1,opt,name=check" json:"check,omitempty"` +} + +func (m *Boolean) Reset() { *m = Boolean{} } +func (m *Boolean) String() string { return proto.CompactTextString(m) } +func (*Boolean) ProtoMessage() {} +func (*Boolean) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } + +func (m *Boolean) GetCheck() bool { + if m != nil { + return m.Check + } + return false +} + type InputArray struct { In []*Init `protobuf:"bytes,1,rep,name=in" json:"in,omitempty"` } @@ -151,7 +177,7 @@ type InputArray struct { func (m *InputArray) Reset() { *m = InputArray{} } func (m *InputArray) String() string { return proto.CompactTextString(m) } func (*InputArray) ProtoMessage() {} -func (*InputArray) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} } +func (*InputArray) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } func (m *InputArray) GetIn() []*Init { if m != nil { @@ -168,7 +194,7 @@ type Init struct { func (m *Init) Reset() { *m = Init{} } func (m *Init) String() string { return proto.CompactTextString(m) } func (*Init) ProtoMessage() {} -func (*Init) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} } +func (*Init) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } func (m *Init) GetName() Crawlers { if m != nil { @@ -192,7 +218,7 @@ type Input struct { func (m *Input) Reset() { *m = Input{} } func (m *Input) String() string { return proto.CompactTextString(m) } func (*Input) ProtoMessage() {} -func (*Input) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} } +func (*Input) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} } func (m *Input) GetName() Crawlers { if m != nil { @@ -218,7 +244,7 @@ type Output struct { func (m *Output) Reset() { *m = Output{} } func (m *Output) String() string { return proto.CompactTextString(m) } func (*Output) ProtoMessage() {} -func (*Output) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} } +func (*Output) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } func (m *Output) GetStartDate() int64 { if m != nil { @@ -242,6 +268,8 @@ func (m *Output) GetData() []byte { } func init() { + proto.RegisterType((*Empty)(nil), "Empty") + proto.RegisterType((*Boolean)(nil), "Boolean") proto.RegisterType((*InputArray)(nil), "InputArray") proto.RegisterType((*Init)(nil), "Init") proto.RegisterType((*Input)(nil), "Input") @@ -451,41 +479,108 @@ var _Data_serviceDesc = grpc1.ServiceDesc{ Metadata: "grpc.proto", } +// Client API for Status service + +type StatusClient interface { + Status(ctx context.Context, in *Empty, opts ...grpc1.CallOption) (*Boolean, error) +} + +type statusClient struct { + cc *grpc1.ClientConn +} + +func NewStatusClient(cc *grpc1.ClientConn) StatusClient { + return &statusClient{cc} +} + +func (c *statusClient) Status(ctx context.Context, in *Empty, opts ...grpc1.CallOption) (*Boolean, error) { + out := new(Boolean) + err := grpc1.Invoke(ctx, "/Status/Status", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for Status service + +type StatusServer interface { + Status(context.Context, *Empty) (*Boolean, error) +} + +func RegisterStatusServer(s *grpc1.Server, srv StatusServer) { + s.RegisterService(&_Status_serviceDesc, srv) +} + +func _Status_Status_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc1.UnaryServerInterceptor) (interface{}, error) { + in := new(Empty) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(StatusServer).Status(ctx, in) + } + info := &grpc1.UnaryServerInfo{ + Server: srv, + FullMethod: "/Status/Status", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(StatusServer).Status(ctx, req.(*Empty)) + } + return interceptor(ctx, in, info, handler) +} + +var _Status_serviceDesc = grpc1.ServiceDesc{ + ServiceName: "Status", + HandlerType: (*StatusServer)(nil), + Methods: []grpc1.MethodDesc{ + { + MethodName: "Status", + Handler: _Status_Status_Handler, + }, + }, + Streams: []grpc1.StreamDesc{}, + Metadata: "grpc.proto", +} + func init() { proto.RegisterFile("grpc.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 517 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0x4d, 0x6f, 0xd3, 0x4c, - 0x10, 0xc7, 0xeb, 0x97, 0x38, 0xcd, 0xa4, 0x4d, 0xa7, 0xfb, 0xb4, 0x7d, 0x4c, 0xfa, 0xa2, 0x28, - 0x5c, 0x22, 0x0e, 0x3e, 0x24, 0x12, 0x12, 0xc7, 0x8d, 0x6d, 0x12, 0xa3, 0xf8, 0x85, 0x5d, 0xab, - 0xd0, 0x53, 0x65, 0xb0, 0x29, 0x96, 0xa8, 0x13, 0xb9, 0x5b, 0x10, 0xdf, 0x82, 0x8f, 0x8c, 0xd6, - 0x71, 0x94, 0x3d, 0x54, 0xe2, 0x36, 0xf3, 0x9b, 0xf9, 0xff, 0x67, 0xd7, 0xde, 0x01, 0x78, 0xa8, - 0x37, 0x5f, 0x9d, 0x4d, 0xbd, 0x16, 0xeb, 0xf1, 0x6b, 0x80, 0xa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0xec, 0x10, - 0x02, 0x83, 0x16, 0x84, 0x71, 0xb4, 0x88, 0xbd, 0x39, 0x5a, 0x04, 0xe1, 0x68, 0xc7, 0x38, 0xff, - 0xb8, 0xc2, 0xae, 0x4a, 0xee, 0x24, 0x39, 0x54, 0x75, 0x94, 0x05, 0xd4, 0x9b, 0x63, 0x4f, 0xe9, - 0x4a, 0x16, 0xb2, 0x0b, 0x94, 0xae, 0xc8, 0x4f, 0xe7, 0x41, 0xcc, 0xb1, 0x4f, 0x4e, 0xe1, 0xb8, - 0x65, 0x31, 0xa3, 0xee, 0xca, 0xc7, 0x23, 0xe5, 0x54, 0x49, 0x9c, 0xcc, 0xf0, 0x58, 0x71, 0x62, - 0xbe, 0x17, 0x70, 0x1c, 0x28, 0x57, 0x65, 0x61, 0x80, 0x27, 0x4a, 0xce, 0xc3, 0x39, 0xa2, 0x62, - 0xc1, 0xc3, 0x34, 0xc1, 0x53, 0x65, 0x34, 0x8f, 0xc2, 0xe4, 0x76, 0xea, 0x22, 0x51, 0x46, 0x37, - 0x6c, 0x86, 0xff, 0xa9, 0x3e, 0x7c, 0x89, 0x67, 0x4a, 0x4b, 0xea, 0xaf, 0x22, 0x3f, 0xc5, 0x73, - 0xa5, 0xe5, 0x53, 0x18, 0xe0, 0x05, 0x39, 0x03, 0x6c, 0x73, 0x97, 0x72, 0x4e, 0x23, 0x8f, 0x51, - 0xfc, 0x5f, 0x39, 0xc0, 0x32, 0x4d, 0x13, 0xb4, 0x49, 0x17, 0x0c, 0xf9, 0x11, 0x5e, 0x91, 0x43, - 0x30, 0xe5, 0x38, 0x1c, 0x4a, 0x24, 0x2d, 0x2e, 0x65, 0xf0, 0x21, 0xfc, 0x8c, 0x57, 0xa4, 0x07, - 0x9d, 0xed, 0x0d, 0xaf, 0x49, 0x1f, 0xba, 0xbb, 0x5f, 0x70, 0x33, 0xbd, 0x07, 0xcb, 0x5d, 0x57, - 0xdf, 0xca, 0x07, 0x62, 0x83, 0x41, 0xf3, 0x9c, 0x58, 0x4e, 0xf3, 0x60, 0x87, 0x5d, 0x67, 0xfb, - 0x00, 0xc7, 0x07, 0xe4, 0x12, 0x2c, 0x56, 0x3c, 0xae, 0x7f, 0x16, 0x2f, 0x15, 0x6f, 0xda, 0xe5, - 0xe8, 0x3b, 0xfb, 0x45, 0x52, 0xea, 0xd3, 0x11, 0x98, 0x5e, 0x26, 0x32, 0x69, 0xbf, 0x28, 0xc4, - 0x0b, 0x0e, 0x5f, 0xac, 0x66, 0x15, 0x67, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xad, 0xd7, 0x31, - 0xc7, 0x98, 0x03, 0x00, 0x00, + // 569 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0x4f, 0x6f, 0x9b, 0x4c, + 0x10, 0xc6, 0x63, 0x8c, 0xc1, 0x1e, 0x27, 0xce, 0x64, 0xdf, 0x24, 0x2f, 0x75, 0xfe, 0xd4, 0xa2, + 0x52, 0x65, 0xf5, 0xc0, 0xc1, 0x91, 0x2a, 0xf5, 0xb8, 0x06, 0x1a, 0x53, 0x19, 0x43, 0x77, 0x51, + 0xda, 0x9c, 0xa2, 0x6d, 0x4c, 0x13, 0xd4, 0x04, 0x2c, 0xb2, 0x69, 0x95, 0x6f, 0xd1, 0x8f, 0x5c, + 0x81, 0x71, 0xb3, 0x87, 0x48, 0xbd, 0xcd, 0xf3, 0x9b, 0x99, 0x67, 0x76, 0x61, 0x07, 0xe0, 0xa6, + 0x5c, 0x5d, 0x3b, 0xab, 0xb2, 0x90, 0x85, 0x6d, 0x42, 0xc7, 0xbf, 0x5f, 0xc9, 0x27, 0xfb, 0x35, + 0x98, 0xd3, 0xa2, 0xb8, 0x4b, 0x45, 0x4e, 0xf6, 0xa1, 0x73, 0x7d, 0x9b, 0x5e, 0xff, 0xb0, 0x5a, + 0xa3, 0xd6, 0xb8, 0xcb, 0xd6, 0xc2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, 0x9b, 0x2e, 0x97, 0xc4, 0x70, 0xea, 0x07, 0x3b, 0x34, 0x9d, 0xf5, 0x03, 0xb4, + 0xb7, 0xc8, 0x11, 0x18, 0x2c, 0xbd, 0x2f, 0x7e, 0xa6, 0x2f, 0x25, 0x4f, 0x9b, 0xe5, 0xe8, 0x3b, + 0xcf, 0x8b, 0xa4, 0xe4, 0x27, 0x23, 0xd0, 0x3d, 0x21, 0x45, 0x65, 0x7f, 0x9e, 0xca, 0x17, 0x1c, + 0x26, 0x6f, 0xc1, 0xe0, 0x52, 0xc8, 0xc7, 0x07, 0x72, 0xfc, 0x37, 0x32, 0x9c, 0x7a, 0x81, 0x87, + 0x5d, 0xa7, 0xd9, 0x5f, 0x7b, 0xeb, 0x9b, 0x51, 0x2f, 0xf7, 0xd9, 0x9f, 0x00, 0x00, 0x00, 0xff, + 0xff, 0xc2, 0xcc, 0xf9, 0x8c, 0xea, 0x03, 0x00, 0x00, } diff --git a/grpc/grpc.proto b/grpc/grpc.proto index 238386f..417a7d8 100644 --- a/grpc/grpc.proto +++ b/grpc/grpc.proto @@ -47,7 +47,14 @@ service Data { } -// request models +service Status { + rpc Status(Empty) returns (Boolean) {} +} + +message Empty {} +message Boolean { + bool check = 1; +} message InputArray { repeated Init in = 1;