remotecontrol.pb.go 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: remotecontrol.proto
  3. package remotecontrol
  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 LayerMatrix_ContentType int32
  23. const (
  24. LayerMatrix_Activations LayerMatrix_ContentType = 0
  25. LayerMatrix_Weights LayerMatrix_ContentType = 1
  26. LayerMatrix_Biases LayerMatrix_ContentType = 2
  27. )
  28. var LayerMatrix_ContentType_name = map[int32]string{
  29. 0: "Activations",
  30. 1: "Weights",
  31. 2: "Biases",
  32. }
  33. var LayerMatrix_ContentType_value = map[string]int32{
  34. "Activations": 0,
  35. "Weights": 1,
  36. "Biases": 2,
  37. }
  38. func (x LayerMatrix_ContentType) String() string {
  39. return proto.EnumName(LayerMatrix_ContentType_name, int32(x))
  40. }
  41. func (LayerMatrix_ContentType) EnumDescriptor() ([]byte, []int) {
  42. return fileDescriptor_9e7470c0107e56c6, []int{1, 0}
  43. }
  44. type Matrix struct {
  45. Matrix []byte `protobuf:"bytes,1,opt,name=matrix,proto3" json:"matrix,omitempty"`
  46. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  47. XXX_unrecognized []byte `json:"-"`
  48. XXX_sizecache int32 `json:"-"`
  49. }
  50. func (m *Matrix) Reset() { *m = Matrix{} }
  51. func (m *Matrix) String() string { return proto.CompactTextString(m) }
  52. func (*Matrix) ProtoMessage() {}
  53. func (*Matrix) Descriptor() ([]byte, []int) {
  54. return fileDescriptor_9e7470c0107e56c6, []int{0}
  55. }
  56. func (m *Matrix) XXX_Unmarshal(b []byte) error {
  57. return xxx_messageInfo_Matrix.Unmarshal(m, b)
  58. }
  59. func (m *Matrix) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  60. return xxx_messageInfo_Matrix.Marshal(b, m, deterministic)
  61. }
  62. func (m *Matrix) XXX_Merge(src proto.Message) {
  63. xxx_messageInfo_Matrix.Merge(m, src)
  64. }
  65. func (m *Matrix) XXX_Size() int {
  66. return xxx_messageInfo_Matrix.Size(m)
  67. }
  68. func (m *Matrix) XXX_DiscardUnknown() {
  69. xxx_messageInfo_Matrix.DiscardUnknown(m)
  70. }
  71. var xxx_messageInfo_Matrix proto.InternalMessageInfo
  72. func (m *Matrix) GetMatrix() []byte {
  73. if m != nil {
  74. return m.Matrix
  75. }
  76. return nil
  77. }
  78. type LayerMatrix struct {
  79. ContentType LayerMatrix_ContentType `protobuf:"varint,1,opt,name=contentType,proto3,enum=remotecontrol.LayerMatrix_ContentType" json:"contentType,omitempty"`
  80. Layer int32 `protobuf:"zigzag32,2,opt,name=layer,proto3" json:"layer,omitempty"`
  81. Matrix *Matrix `protobuf:"bytes,3,opt,name=matrix,proto3" json:"matrix,omitempty"`
  82. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  83. XXX_unrecognized []byte `json:"-"`
  84. XXX_sizecache int32 `json:"-"`
  85. }
  86. func (m *LayerMatrix) Reset() { *m = LayerMatrix{} }
  87. func (m *LayerMatrix) String() string { return proto.CompactTextString(m) }
  88. func (*LayerMatrix) ProtoMessage() {}
  89. func (*LayerMatrix) Descriptor() ([]byte, []int) {
  90. return fileDescriptor_9e7470c0107e56c6, []int{1}
  91. }
  92. func (m *LayerMatrix) XXX_Unmarshal(b []byte) error {
  93. return xxx_messageInfo_LayerMatrix.Unmarshal(m, b)
  94. }
  95. func (m *LayerMatrix) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  96. return xxx_messageInfo_LayerMatrix.Marshal(b, m, deterministic)
  97. }
  98. func (m *LayerMatrix) XXX_Merge(src proto.Message) {
  99. xxx_messageInfo_LayerMatrix.Merge(m, src)
  100. }
  101. func (m *LayerMatrix) XXX_Size() int {
  102. return xxx_messageInfo_LayerMatrix.Size(m)
  103. }
  104. func (m *LayerMatrix) XXX_DiscardUnknown() {
  105. xxx_messageInfo_LayerMatrix.DiscardUnknown(m)
  106. }
  107. var xxx_messageInfo_LayerMatrix proto.InternalMessageInfo
  108. func (m *LayerMatrix) GetContentType() LayerMatrix_ContentType {
  109. if m != nil {
  110. return m.ContentType
  111. }
  112. return LayerMatrix_Activations
  113. }
  114. func (m *LayerMatrix) GetLayer() int32 {
  115. if m != nil {
  116. return m.Layer
  117. }
  118. return 0
  119. }
  120. func (m *LayerMatrix) GetMatrix() *Matrix {
  121. if m != nil {
  122. return m.Matrix
  123. }
  124. return nil
  125. }
  126. type Configuration struct {
  127. Sizes []int32 `protobuf:"zigzag32,1,rep,packed,name=sizes,proto3" json:"sizes,omitempty"`
  128. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  129. XXX_unrecognized []byte `json:"-"`
  130. XXX_sizecache int32 `json:"-"`
  131. }
  132. func (m *Configuration) Reset() { *m = Configuration{} }
  133. func (m *Configuration) String() string { return proto.CompactTextString(m) }
  134. func (*Configuration) ProtoMessage() {}
  135. func (*Configuration) Descriptor() ([]byte, []int) {
  136. return fileDescriptor_9e7470c0107e56c6, []int{2}
  137. }
  138. func (m *Configuration) XXX_Unmarshal(b []byte) error {
  139. return xxx_messageInfo_Configuration.Unmarshal(m, b)
  140. }
  141. func (m *Configuration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  142. return xxx_messageInfo_Configuration.Marshal(b, m, deterministic)
  143. }
  144. func (m *Configuration) XXX_Merge(src proto.Message) {
  145. xxx_messageInfo_Configuration.Merge(m, src)
  146. }
  147. func (m *Configuration) XXX_Size() int {
  148. return xxx_messageInfo_Configuration.Size(m)
  149. }
  150. func (m *Configuration) XXX_DiscardUnknown() {
  151. xxx_messageInfo_Configuration.DiscardUnknown(m)
  152. }
  153. var xxx_messageInfo_Configuration proto.InternalMessageInfo
  154. func (m *Configuration) GetSizes() []int32 {
  155. if m != nil {
  156. return m.Sizes
  157. }
  158. return nil
  159. }
  160. type None struct {
  161. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  162. XXX_unrecognized []byte `json:"-"`
  163. XXX_sizecache int32 `json:"-"`
  164. }
  165. func (m *None) Reset() { *m = None{} }
  166. func (m *None) String() string { return proto.CompactTextString(m) }
  167. func (*None) ProtoMessage() {}
  168. func (*None) Descriptor() ([]byte, []int) {
  169. return fileDescriptor_9e7470c0107e56c6, []int{3}
  170. }
  171. func (m *None) XXX_Unmarshal(b []byte) error {
  172. return xxx_messageInfo_None.Unmarshal(m, b)
  173. }
  174. func (m *None) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  175. return xxx_messageInfo_None.Marshal(b, m, deterministic)
  176. }
  177. func (m *None) XXX_Merge(src proto.Message) {
  178. xxx_messageInfo_None.Merge(m, src)
  179. }
  180. func (m *None) XXX_Size() int {
  181. return xxx_messageInfo_None.Size(m)
  182. }
  183. func (m *None) XXX_DiscardUnknown() {
  184. xxx_messageInfo_None.DiscardUnknown(m)
  185. }
  186. var xxx_messageInfo_None proto.InternalMessageInfo
  187. func init() {
  188. proto.RegisterEnum("remotecontrol.LayerMatrix_ContentType", LayerMatrix_ContentType_name, LayerMatrix_ContentType_value)
  189. proto.RegisterType((*Matrix)(nil), "remotecontrol.Matrix")
  190. proto.RegisterType((*LayerMatrix)(nil), "remotecontrol.LayerMatrix")
  191. proto.RegisterType((*Configuration)(nil), "remotecontrol.Configuration")
  192. proto.RegisterType((*None)(nil), "remotecontrol.None")
  193. }
  194. func init() { proto.RegisterFile("remotecontrol.proto", fileDescriptor_9e7470c0107e56c6) }
  195. var fileDescriptor_9e7470c0107e56c6 = []byte{
  196. // 331 bytes of a gzipped FileDescriptorProto
  197. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0x41, 0x4f, 0xc2, 0x40,
  198. 0x10, 0x85, 0xbb, 0xa0, 0x25, 0x99, 0x15, 0xad, 0x83, 0x1a, 0x42, 0x3c, 0x34, 0x9b, 0x68, 0xb8,
  199. 0x48, 0x0c, 0x1e, 0xd4, 0x83, 0x26, 0xc2, 0x41, 0x0f, 0x6a, 0x4c, 0x35, 0xf1, 0x5c, 0x61, 0xc5,
  200. 0x4d, 0x68, 0x97, 0xec, 0x0e, 0x46, 0xfc, 0x15, 0xfe, 0x39, 0xff, 0x8f, 0xe9, 0x82, 0x48, 0x49,
  201. 0xbd, 0x70, 0xeb, 0xbc, 0xbc, 0xf7, 0xe6, 0xeb, 0xb4, 0x50, 0x33, 0x32, 0xd1, 0x24, 0x7b, 0x3a,
  202. 0x25, 0xa3, 0x87, 0xad, 0x91, 0xd1, 0xa4, 0xb1, 0x9a, 0x13, 0x45, 0x08, 0xfe, 0x5d, 0x4c, 0x46,
  203. 0x7d, 0xe0, 0x1e, 0xf8, 0x89, 0x7b, 0xaa, 0xb3, 0x90, 0x35, 0x37, 0xa2, 0xd9, 0x24, 0xbe, 0x19,
  204. 0xf0, 0xdb, 0x78, 0x22, 0xcd, 0xcc, 0x77, 0x03, 0x3c, 0x0b, 0xcb, 0x94, 0x9e, 0x26, 0x23, 0xe9,
  205. 0xcc, 0x9b, 0xed, 0xc3, 0x56, 0x7e, 0xd7, 0x42, 0xa0, 0xd5, 0xfd, 0x73, 0x47, 0x8b, 0x51, 0xdc,
  206. 0x81, 0xf5, 0x61, 0xe6, 0xab, 0x97, 0x42, 0xd6, 0xdc, 0x8e, 0xa6, 0x03, 0x1e, 0xcd, 0x39, 0xca,
  207. 0x21, 0x6b, 0xf2, 0xf6, 0xee, 0x52, 0xf5, 0xb4, 0x75, 0x8e, 0x77, 0x0a, 0x7c, 0x61, 0x01, 0x6e,
  208. 0x01, 0xbf, 0xea, 0x91, 0x7a, 0x8f, 0x49, 0xe9, 0xd4, 0x06, 0x1e, 0x72, 0xa8, 0x3c, 0x4b, 0x35,
  209. 0x78, 0x23, 0x1b, 0x30, 0x04, 0xf0, 0x3b, 0x2a, 0xb6, 0xd2, 0x06, 0x25, 0x71, 0x00, 0xd5, 0xae,
  210. 0x4e, 0x5f, 0xd5, 0x60, 0x6c, 0x9c, 0x39, 0xc3, 0xb1, 0xea, 0x53, 0xda, 0x3a, 0x0b, 0xcb, 0x19,
  211. 0x8e, 0x1b, 0x84, 0x0f, 0x6b, 0xf7, 0x3a, 0x95, 0xed, 0xaf, 0x32, 0x54, 0x23, 0x07, 0xd2, 0x9d,
  212. 0x82, 0xe0, 0x35, 0x04, 0x03, 0x49, 0xf9, 0x8e, 0xda, 0x12, 0x6c, 0x16, 0x6d, 0xec, 0x2f, 0x89,
  213. 0xb9, 0x88, 0xf0, 0xb0, 0x93, 0x63, 0x2e, 0xee, 0x68, 0xfc, 0x7f, 0x60, 0xe1, 0x1d, 0x33, 0xbc,
  214. 0xf8, 0x7d, 0xb3, 0xd5, 0xe2, 0x97, 0xf3, 0x2b, 0xad, 0x96, 0x3f, 0x87, 0xca, 0x83, 0x91, 0x7d,
  215. 0xd5, 0x23, 0x2c, 0xfe, 0x5e, 0x8d, 0x62, 0x59, 0x78, 0x78, 0x06, 0xd0, 0x1f, 0x27, 0xc9, 0xe4,
  216. 0x91, 0x62, 0x43, 0xc5, 0xdb, 0x8b, 0x44, 0xe1, 0xbd, 0xf8, 0xee, 0x8f, 0x3e, 0xf9, 0x09, 0x00,
  217. 0x00, 0xff, 0xff, 0x43, 0xc0, 0x92, 0x1e, 0xe8, 0x02, 0x00, 0x00,
  218. }
  219. // Reference imports to suppress errors if they are not otherwise used.
  220. var _ context.Context
  221. var _ grpc.ClientConn
  222. // This is a compile-time assertion to ensure that this generated file
  223. // is compatible with the grpc package it is being compiled against.
  224. const _ = grpc.SupportPackageIsVersion4
  225. // RemoteControlClient is the client API for RemoteControl service.
  226. //
  227. // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
  228. type RemoteControlClient interface {
  229. GetConfiguration(ctx context.Context, in *None, opts ...grpc.CallOption) (*Configuration, error)
  230. Activations(ctx context.Context, in *None, opts ...grpc.CallOption) (RemoteControl_ActivationsClient, error)
  231. Biases(ctx context.Context, in *None, opts ...grpc.CallOption) (RemoteControl_BiasesClient, error)
  232. Weights(ctx context.Context, in *None, opts ...grpc.CallOption) (RemoteControl_WeightsClient, error)
  233. Predict(ctx context.Context, in *Matrix, opts ...grpc.CallOption) (*Matrix, error)
  234. DummyStart(ctx context.Context, in *None, opts ...grpc.CallOption) (*None, error)
  235. }
  236. type remoteControlClient struct {
  237. cc *grpc.ClientConn
  238. }
  239. func NewRemoteControlClient(cc *grpc.ClientConn) RemoteControlClient {
  240. return &remoteControlClient{cc}
  241. }
  242. func (c *remoteControlClient) GetConfiguration(ctx context.Context, in *None, opts ...grpc.CallOption) (*Configuration, error) {
  243. out := new(Configuration)
  244. err := c.cc.Invoke(ctx, "/remotecontrol.RemoteControl/getConfiguration", in, out, opts...)
  245. if err != nil {
  246. return nil, err
  247. }
  248. return out, nil
  249. }
  250. func (c *remoteControlClient) Activations(ctx context.Context, in *None, opts ...grpc.CallOption) (RemoteControl_ActivationsClient, error) {
  251. stream, err := c.cc.NewStream(ctx, &_RemoteControl_serviceDesc.Streams[0], "/remotecontrol.RemoteControl/Activations", opts...)
  252. if err != nil {
  253. return nil, err
  254. }
  255. x := &remoteControlActivationsClient{stream}
  256. if err := x.ClientStream.SendMsg(in); err != nil {
  257. return nil, err
  258. }
  259. if err := x.ClientStream.CloseSend(); err != nil {
  260. return nil, err
  261. }
  262. return x, nil
  263. }
  264. type RemoteControl_ActivationsClient interface {
  265. Recv() (*LayerMatrix, error)
  266. grpc.ClientStream
  267. }
  268. type remoteControlActivationsClient struct {
  269. grpc.ClientStream
  270. }
  271. func (x *remoteControlActivationsClient) Recv() (*LayerMatrix, error) {
  272. m := new(LayerMatrix)
  273. if err := x.ClientStream.RecvMsg(m); err != nil {
  274. return nil, err
  275. }
  276. return m, nil
  277. }
  278. func (c *remoteControlClient) Biases(ctx context.Context, in *None, opts ...grpc.CallOption) (RemoteControl_BiasesClient, error) {
  279. stream, err := c.cc.NewStream(ctx, &_RemoteControl_serviceDesc.Streams[1], "/remotecontrol.RemoteControl/Biases", opts...)
  280. if err != nil {
  281. return nil, err
  282. }
  283. x := &remoteControlBiasesClient{stream}
  284. if err := x.ClientStream.SendMsg(in); err != nil {
  285. return nil, err
  286. }
  287. if err := x.ClientStream.CloseSend(); err != nil {
  288. return nil, err
  289. }
  290. return x, nil
  291. }
  292. type RemoteControl_BiasesClient interface {
  293. Recv() (*LayerMatrix, error)
  294. grpc.ClientStream
  295. }
  296. type remoteControlBiasesClient struct {
  297. grpc.ClientStream
  298. }
  299. func (x *remoteControlBiasesClient) Recv() (*LayerMatrix, error) {
  300. m := new(LayerMatrix)
  301. if err := x.ClientStream.RecvMsg(m); err != nil {
  302. return nil, err
  303. }
  304. return m, nil
  305. }
  306. func (c *remoteControlClient) Weights(ctx context.Context, in *None, opts ...grpc.CallOption) (RemoteControl_WeightsClient, error) {
  307. stream, err := c.cc.NewStream(ctx, &_RemoteControl_serviceDesc.Streams[2], "/remotecontrol.RemoteControl/Weights", opts...)
  308. if err != nil {
  309. return nil, err
  310. }
  311. x := &remoteControlWeightsClient{stream}
  312. if err := x.ClientStream.SendMsg(in); err != nil {
  313. return nil, err
  314. }
  315. if err := x.ClientStream.CloseSend(); err != nil {
  316. return nil, err
  317. }
  318. return x, nil
  319. }
  320. type RemoteControl_WeightsClient interface {
  321. Recv() (*LayerMatrix, error)
  322. grpc.ClientStream
  323. }
  324. type remoteControlWeightsClient struct {
  325. grpc.ClientStream
  326. }
  327. func (x *remoteControlWeightsClient) Recv() (*LayerMatrix, error) {
  328. m := new(LayerMatrix)
  329. if err := x.ClientStream.RecvMsg(m); err != nil {
  330. return nil, err
  331. }
  332. return m, nil
  333. }
  334. func (c *remoteControlClient) Predict(ctx context.Context, in *Matrix, opts ...grpc.CallOption) (*Matrix, error) {
  335. out := new(Matrix)
  336. err := c.cc.Invoke(ctx, "/remotecontrol.RemoteControl/Predict", in, out, opts...)
  337. if err != nil {
  338. return nil, err
  339. }
  340. return out, nil
  341. }
  342. func (c *remoteControlClient) DummyStart(ctx context.Context, in *None, opts ...grpc.CallOption) (*None, error) {
  343. out := new(None)
  344. err := c.cc.Invoke(ctx, "/remotecontrol.RemoteControl/dummyStart", in, out, opts...)
  345. if err != nil {
  346. return nil, err
  347. }
  348. return out, nil
  349. }
  350. // RemoteControlServer is the server API for RemoteControl service.
  351. type RemoteControlServer interface {
  352. GetConfiguration(context.Context, *None) (*Configuration, error)
  353. Activations(*None, RemoteControl_ActivationsServer) error
  354. Biases(*None, RemoteControl_BiasesServer) error
  355. Weights(*None, RemoteControl_WeightsServer) error
  356. Predict(context.Context, *Matrix) (*Matrix, error)
  357. DummyStart(context.Context, *None) (*None, error)
  358. }
  359. // UnimplementedRemoteControlServer can be embedded to have forward compatible implementations.
  360. type UnimplementedRemoteControlServer struct {
  361. }
  362. func (*UnimplementedRemoteControlServer) GetConfiguration(ctx context.Context, req *None) (*Configuration, error) {
  363. return nil, status.Errorf(codes.Unimplemented, "method GetConfiguration not implemented")
  364. }
  365. func (*UnimplementedRemoteControlServer) Activations(req *None, srv RemoteControl_ActivationsServer) error {
  366. return status.Errorf(codes.Unimplemented, "method Activations not implemented")
  367. }
  368. func (*UnimplementedRemoteControlServer) Biases(req *None, srv RemoteControl_BiasesServer) error {
  369. return status.Errorf(codes.Unimplemented, "method Biases not implemented")
  370. }
  371. func (*UnimplementedRemoteControlServer) Weights(req *None, srv RemoteControl_WeightsServer) error {
  372. return status.Errorf(codes.Unimplemented, "method Weights not implemented")
  373. }
  374. func (*UnimplementedRemoteControlServer) Predict(ctx context.Context, req *Matrix) (*Matrix, error) {
  375. return nil, status.Errorf(codes.Unimplemented, "method Predict not implemented")
  376. }
  377. func (*UnimplementedRemoteControlServer) DummyStart(ctx context.Context, req *None) (*None, error) {
  378. return nil, status.Errorf(codes.Unimplemented, "method DummyStart not implemented")
  379. }
  380. func RegisterRemoteControlServer(s *grpc.Server, srv RemoteControlServer) {
  381. s.RegisterService(&_RemoteControl_serviceDesc, srv)
  382. }
  383. func _RemoteControl_GetConfiguration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  384. in := new(None)
  385. if err := dec(in); err != nil {
  386. return nil, err
  387. }
  388. if interceptor == nil {
  389. return srv.(RemoteControlServer).GetConfiguration(ctx, in)
  390. }
  391. info := &grpc.UnaryServerInfo{
  392. Server: srv,
  393. FullMethod: "/remotecontrol.RemoteControl/GetConfiguration",
  394. }
  395. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  396. return srv.(RemoteControlServer).GetConfiguration(ctx, req.(*None))
  397. }
  398. return interceptor(ctx, in, info, handler)
  399. }
  400. func _RemoteControl_Activations_Handler(srv interface{}, stream grpc.ServerStream) error {
  401. m := new(None)
  402. if err := stream.RecvMsg(m); err != nil {
  403. return err
  404. }
  405. return srv.(RemoteControlServer).Activations(m, &remoteControlActivationsServer{stream})
  406. }
  407. type RemoteControl_ActivationsServer interface {
  408. Send(*LayerMatrix) error
  409. grpc.ServerStream
  410. }
  411. type remoteControlActivationsServer struct {
  412. grpc.ServerStream
  413. }
  414. func (x *remoteControlActivationsServer) Send(m *LayerMatrix) error {
  415. return x.ServerStream.SendMsg(m)
  416. }
  417. func _RemoteControl_Biases_Handler(srv interface{}, stream grpc.ServerStream) error {
  418. m := new(None)
  419. if err := stream.RecvMsg(m); err != nil {
  420. return err
  421. }
  422. return srv.(RemoteControlServer).Biases(m, &remoteControlBiasesServer{stream})
  423. }
  424. type RemoteControl_BiasesServer interface {
  425. Send(*LayerMatrix) error
  426. grpc.ServerStream
  427. }
  428. type remoteControlBiasesServer struct {
  429. grpc.ServerStream
  430. }
  431. func (x *remoteControlBiasesServer) Send(m *LayerMatrix) error {
  432. return x.ServerStream.SendMsg(m)
  433. }
  434. func _RemoteControl_Weights_Handler(srv interface{}, stream grpc.ServerStream) error {
  435. m := new(None)
  436. if err := stream.RecvMsg(m); err != nil {
  437. return err
  438. }
  439. return srv.(RemoteControlServer).Weights(m, &remoteControlWeightsServer{stream})
  440. }
  441. type RemoteControl_WeightsServer interface {
  442. Send(*LayerMatrix) error
  443. grpc.ServerStream
  444. }
  445. type remoteControlWeightsServer struct {
  446. grpc.ServerStream
  447. }
  448. func (x *remoteControlWeightsServer) Send(m *LayerMatrix) error {
  449. return x.ServerStream.SendMsg(m)
  450. }
  451. func _RemoteControl_Predict_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  452. in := new(Matrix)
  453. if err := dec(in); err != nil {
  454. return nil, err
  455. }
  456. if interceptor == nil {
  457. return srv.(RemoteControlServer).Predict(ctx, in)
  458. }
  459. info := &grpc.UnaryServerInfo{
  460. Server: srv,
  461. FullMethod: "/remotecontrol.RemoteControl/Predict",
  462. }
  463. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  464. return srv.(RemoteControlServer).Predict(ctx, req.(*Matrix))
  465. }
  466. return interceptor(ctx, in, info, handler)
  467. }
  468. func _RemoteControl_DummyStart_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
  469. in := new(None)
  470. if err := dec(in); err != nil {
  471. return nil, err
  472. }
  473. if interceptor == nil {
  474. return srv.(RemoteControlServer).DummyStart(ctx, in)
  475. }
  476. info := &grpc.UnaryServerInfo{
  477. Server: srv,
  478. FullMethod: "/remotecontrol.RemoteControl/DummyStart",
  479. }
  480. handler := func(ctx context.Context, req interface{}) (interface{}, error) {
  481. return srv.(RemoteControlServer).DummyStart(ctx, req.(*None))
  482. }
  483. return interceptor(ctx, in, info, handler)
  484. }
  485. var _RemoteControl_serviceDesc = grpc.ServiceDesc{
  486. ServiceName: "remotecontrol.RemoteControl",
  487. HandlerType: (*RemoteControlServer)(nil),
  488. Methods: []grpc.MethodDesc{
  489. {
  490. MethodName: "getConfiguration",
  491. Handler: _RemoteControl_GetConfiguration_Handler,
  492. },
  493. {
  494. MethodName: "Predict",
  495. Handler: _RemoteControl_Predict_Handler,
  496. },
  497. {
  498. MethodName: "dummyStart",
  499. Handler: _RemoteControl_DummyStart_Handler,
  500. },
  501. },
  502. Streams: []grpc.StreamDesc{
  503. {
  504. StreamName: "Activations",
  505. Handler: _RemoteControl_Activations_Handler,
  506. ServerStreams: true,
  507. },
  508. {
  509. StreamName: "Biases",
  510. Handler: _RemoteControl_Biases_Handler,
  511. ServerStreams: true,
  512. },
  513. {
  514. StreamName: "Weights",
  515. Handler: _RemoteControl_Weights_Handler,
  516. ServerStreams: true,
  517. },
  518. },
  519. Metadata: "remotecontrol.proto",
  520. }