cluster.pb.go 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: cluster.proto
  3. package cluster
  4. import (
  5. context "context"
  6. fmt "fmt"
  7. proto "github.com/golang/protobuf/proto"
  8. grpc "google.golang.org/grpc"
  9. codes "google.golang.org/grpc/codes"
  10. status "google.golang.org/grpc/status"
  11. math "math"
  12. )
  13. // Reference imports to suppress errors if they are not otherwise used.
  14. var _ = proto.Marshal
  15. var _ = fmt.Errorf
  16. var _ = math.Inf
  17. // This is a compile-time assertion to ensure that this generated file
  18. // is compatible with the proto package it is being compiled against.
  19. // A compilation error at this line likely means your copy of the
  20. // proto package needs to be updated.
  21. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
  22. type Unit struct {
  23. Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
  24. AvailableThreads int32 `protobuf:"zigzag32,2,opt,name=availableThreads,proto3" json:"availableThreads,omitempty"`
  25. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  26. XXX_unrecognized []byte `json:"-"`
  27. XXX_sizecache int32 `json:"-"`
  28. }
  29. func (m *Unit) Reset() { *m = Unit{} }
  30. func (m *Unit) String() string { return proto.CompactTextString(m) }
  31. func (*Unit) ProtoMessage() {}
  32. func (*Unit) Descriptor() ([]byte, []int) {
  33. return fileDescriptor_3cfb3b8ec240c376, []int{0}
  34. }
  35. func (m *Unit) XXX_Unmarshal(b []byte) error {
  36. return xxx_messageInfo_Unit.Unmarshal(m, b)
  37. }
  38. func (m *Unit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  39. return xxx_messageInfo_Unit.Marshal(b, m, deterministic)
  40. }
  41. func (m *Unit) XXX_Merge(src proto.Message) {
  42. xxx_messageInfo_Unit.Merge(m, src)
  43. }
  44. func (m *Unit) XXX_Size() int {
  45. return xxx_messageInfo_Unit.Size(m)
  46. }
  47. func (m *Unit) XXX_DiscardUnknown() {
  48. xxx_messageInfo_Unit.DiscardUnknown(m)
  49. }
  50. var xxx_messageInfo_Unit proto.InternalMessageInfo
  51. func (m *Unit) GetUrl() string {
  52. if m != nil {
  53. return m.Url
  54. }
  55. return ""
  56. }
  57. func (m *Unit) GetAvailableThreads() int32 {
  58. if m != nil {
  59. return m.AvailableThreads
  60. }
  61. return 0
  62. }
  63. type Units struct {
  64. List []*Unit `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
  65. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  66. XXX_unrecognized []byte `json:"-"`
  67. XXX_sizecache int32 `json:"-"`
  68. }
  69. func (m *Units) Reset() { *m = Units{} }
  70. func (m *Units) String() string { return proto.CompactTextString(m) }
  71. func (*Units) ProtoMessage() {}
  72. func (*Units) Descriptor() ([]byte, []int) {
  73. return fileDescriptor_3cfb3b8ec240c376, []int{1}
  74. }
  75. func (m *Units) XXX_Unmarshal(b []byte) error {
  76. return xxx_messageInfo_Units.Unmarshal(m, b)
  77. }
  78. func (m *Units) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  79. return xxx_messageInfo_Units.Marshal(b, m, deterministic)
  80. }
  81. func (m *Units) XXX_Merge(src proto.Message) {
  82. xxx_messageInfo_Units.Merge(m, src)
  83. }
  84. func (m *Units) XXX_Size() int {
  85. return xxx_messageInfo_Units.Size(m)
  86. }
  87. func (m *Units) XXX_DiscardUnknown() {
  88. xxx_messageInfo_Units.DiscardUnknown(m)
  89. }
  90. var xxx_messageInfo_Units proto.InternalMessageInfo
  91. func (m *Units) GetList() []*Unit {
  92. if m != nil {
  93. return m.List
  94. }
  95. return nil
  96. }
  97. func init() {
  98. proto.RegisterType((*Unit)(nil), "cluster.Unit")
  99. proto.RegisterType((*Units)(nil), "cluster.Units")
  100. }
  101. func init() { proto.RegisterFile("cluster.proto", fileDescriptor_3cfb3b8ec240c376) }
  102. var fileDescriptor_3cfb3b8ec240c376 = []byte{
  103. // 173 bytes of a gzipped FileDescriptorProto
  104. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4d, 0xce, 0x29, 0x2d,
  105. 0x2e, 0x49, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x87, 0x72, 0x95, 0x5c, 0xb8,
  106. 0x58, 0x42, 0xf3, 0x32, 0x4b, 0x84, 0x04, 0xb8, 0x98, 0x4b, 0x8b, 0x72, 0x24, 0x18, 0x15, 0x18,
  107. 0x35, 0x38, 0x83, 0x40, 0x4c, 0x21, 0x2d, 0x2e, 0x81, 0xc4, 0xb2, 0xc4, 0xcc, 0x9c, 0xc4, 0xa4,
  108. 0x9c, 0xd4, 0x90, 0x8c, 0xa2, 0xd4, 0xc4, 0x94, 0x62, 0x09, 0x26, 0x05, 0x46, 0x0d, 0xc1, 0x20,
  109. 0x0c, 0x71, 0x25, 0x2d, 0x2e, 0x56, 0x90, 0x29, 0xc5, 0x42, 0x8a, 0x5c, 0x2c, 0x39, 0x99, 0xc5,
  110. 0x25, 0x12, 0x8c, 0x0a, 0xcc, 0x1a, 0xdc, 0x46, 0xbc, 0x7a, 0x30, 0x5b, 0x41, 0xb2, 0x41, 0x60,
  111. 0x29, 0x23, 0x57, 0x2e, 0x11, 0xbf, 0xd4, 0xd2, 0xa2, 0xc4, 0x1c, 0xbf, 0xd4, 0x92, 0xf2, 0xfc,
  112. 0xa2, 0x6c, 0x67, 0x88, 0x12, 0x21, 0x5d, 0x2e, 0x8e, 0xa0, 0xd4, 0xf4, 0x4c, 0x30, 0x1b, 0x55,
  113. 0xa3, 0x14, 0x1f, 0x0a, 0xb7, 0x58, 0x89, 0xc1, 0x80, 0x31, 0x89, 0x0d, 0xec, 0x11, 0x63, 0x40,
  114. 0x00, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x84, 0xe4, 0x41, 0xd9, 0x00, 0x00, 0x00,
  115. }
  116. // Reference imports to suppress errors if they are not otherwise used.
  117. var _ context.Context
  118. var _ grpc.ClientConnInterface
  119. // This is a compile-time assertion to ensure that this generated file
  120. // is compatible with the grpc package it is being compiled against.
  121. const _ = grpc.SupportPackageIsVersion6
  122. // NeuralNetworkClusterClient is the client API for NeuralNetworkCluster service.
  123. //
  124. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  125. type NeuralNetworkClusterClient interface {
  126. Register(ctx context.Context, in *Unit, opts ...grpc.CallOption) (NeuralNetworkCluster_RegisterClient, error)
  127. }
  128. type neuralNetworkClusterClient struct {
  129. cc grpc.ClientConnInterface
  130. }
  131. func NewNeuralNetworkClusterClient(cc grpc.ClientConnInterface) NeuralNetworkClusterClient {
  132. return &neuralNetworkClusterClient{cc}
  133. }
  134. func (c *neuralNetworkClusterClient) Register(ctx context.Context, in *Unit, opts ...grpc.CallOption) (NeuralNetworkCluster_RegisterClient, error) {
  135. stream, err := c.cc.NewStream(ctx, &_NeuralNetworkCluster_serviceDesc.Streams[0], "/cluster.NeuralNetworkCluster/Register", opts...)
  136. if err != nil {
  137. return nil, err
  138. }
  139. x := &neuralNetworkClusterRegisterClient{stream}
  140. if err := x.ClientStream.SendMsg(in); err != nil {
  141. return nil, err
  142. }
  143. if err := x.ClientStream.CloseSend(); err != nil {
  144. return nil, err
  145. }
  146. return x, nil
  147. }
  148. type NeuralNetworkCluster_RegisterClient interface {
  149. Recv() (*Units, error)
  150. grpc.ClientStream
  151. }
  152. type neuralNetworkClusterRegisterClient struct {
  153. grpc.ClientStream
  154. }
  155. func (x *neuralNetworkClusterRegisterClient) Recv() (*Units, error) {
  156. m := new(Units)
  157. if err := x.ClientStream.RecvMsg(m); err != nil {
  158. return nil, err
  159. }
  160. return m, nil
  161. }
  162. // NeuralNetworkClusterServer is the server API for NeuralNetworkCluster service.
  163. type NeuralNetworkClusterServer interface {
  164. Register(*Unit, NeuralNetworkCluster_RegisterServer) error
  165. }
  166. // UnimplementedNeuralNetworkClusterServer can be embedded to have forward compatible implementations.
  167. type UnimplementedNeuralNetworkClusterServer struct {
  168. }
  169. func (*UnimplementedNeuralNetworkClusterServer) Register(req *Unit, srv NeuralNetworkCluster_RegisterServer) error {
  170. return status.Errorf(codes.Unimplemented, "method Register not implemented")
  171. }
  172. func RegisterNeuralNetworkClusterServer(s *grpc.Server, srv NeuralNetworkClusterServer) {
  173. s.RegisterService(&_NeuralNetworkCluster_serviceDesc, srv)
  174. }
  175. func _NeuralNetworkCluster_Register_Handler(srv interface{}, stream grpc.ServerStream) error {
  176. m := new(Unit)
  177. if err := stream.RecvMsg(m); err != nil {
  178. return err
  179. }
  180. return srv.(NeuralNetworkClusterServer).Register(m, &neuralNetworkClusterRegisterServer{stream})
  181. }
  182. type NeuralNetworkCluster_RegisterServer interface {
  183. Send(*Units) error
  184. grpc.ServerStream
  185. }
  186. type neuralNetworkClusterRegisterServer struct {
  187. grpc.ServerStream
  188. }
  189. func (x *neuralNetworkClusterRegisterServer) Send(m *Units) error {
  190. return x.ServerStream.SendMsg(m)
  191. }
  192. var _NeuralNetworkCluster_serviceDesc = grpc.ServiceDesc{
  193. ServiceName: "cluster.NeuralNetworkCluster",
  194. HandlerType: (*NeuralNetworkClusterServer)(nil),
  195. Methods: []grpc.MethodDesc{},
  196. Streams: []grpc.StreamDesc{
  197. {
  198. StreamName: "Register",
  199. Handler: _NeuralNetworkCluster_Register_Handler,
  200. ServerStreams: true,
  201. },
  202. },
  203. Metadata: "cluster.proto",
  204. }