|
@@ -0,0 +1,557 @@
|
|
|
+// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
|
+// source: remotecontrol.proto
|
|
|
+
|
|
|
+package remotecontrol
|
|
|
+
|
|
|
+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"
|
|
|
+)
|
|
|
+
|
|
|
+// Reference imports to suppress errors if they are not otherwise used.
|
|
|
+var _ = proto.Marshal
|
|
|
+var _ = fmt.Errorf
|
|
|
+var _ = math.Inf
|
|
|
+
|
|
|
+// This is a compile-time assertion to ensure that this generated file
|
|
|
+// is compatible with the proto package it is being compiled against.
|
|
|
+// A compilation error at this line likely means your copy of the
|
|
|
+// proto package needs to be updated.
|
|
|
+const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
|
|
|
+
|
|
|
+type LayerMatrix_ContentType int32
|
|
|
+
|
|
|
+const (
|
|
|
+ LayerMatrix_Activations LayerMatrix_ContentType = 0
|
|
|
+ LayerMatrix_Weights LayerMatrix_ContentType = 1
|
|
|
+ LayerMatrix_Biases LayerMatrix_ContentType = 2
|
|
|
+)
|
|
|
+
|
|
|
+var LayerMatrix_ContentType_name = map[int32]string{
|
|
|
+ 0: "Activations",
|
|
|
+ 1: "Weights",
|
|
|
+ 2: "Biases",
|
|
|
+}
|
|
|
+
|
|
|
+var LayerMatrix_ContentType_value = map[string]int32{
|
|
|
+ "Activations": 0,
|
|
|
+ "Weights": 1,
|
|
|
+ "Biases": 2,
|
|
|
+}
|
|
|
+
|
|
|
+func (x LayerMatrix_ContentType) String() string {
|
|
|
+ return proto.EnumName(LayerMatrix_ContentType_name, int32(x))
|
|
|
+}
|
|
|
+
|
|
|
+func (LayerMatrix_ContentType) EnumDescriptor() ([]byte, []int) {
|
|
|
+ return fileDescriptor_9e7470c0107e56c6, []int{1, 0}
|
|
|
+}
|
|
|
+
|
|
|
+type Matrix struct {
|
|
|
+ Matrix []byte `protobuf:"bytes,1,opt,name=matrix,proto3" json:"matrix,omitempty"`
|
|
|
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
+ XXX_unrecognized []byte `json:"-"`
|
|
|
+ XXX_sizecache int32 `json:"-"`
|
|
|
+}
|
|
|
+
|
|
|
+func (m *Matrix) Reset() { *m = Matrix{} }
|
|
|
+func (m *Matrix) String() string { return proto.CompactTextString(m) }
|
|
|
+func (*Matrix) ProtoMessage() {}
|
|
|
+func (*Matrix) Descriptor() ([]byte, []int) {
|
|
|
+ return fileDescriptor_9e7470c0107e56c6, []int{0}
|
|
|
+}
|
|
|
+
|
|
|
+func (m *Matrix) XXX_Unmarshal(b []byte) error {
|
|
|
+ return xxx_messageInfo_Matrix.Unmarshal(m, b)
|
|
|
+}
|
|
|
+func (m *Matrix) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
+ return xxx_messageInfo_Matrix.Marshal(b, m, deterministic)
|
|
|
+}
|
|
|
+func (m *Matrix) XXX_Merge(src proto.Message) {
|
|
|
+ xxx_messageInfo_Matrix.Merge(m, src)
|
|
|
+}
|
|
|
+func (m *Matrix) XXX_Size() int {
|
|
|
+ return xxx_messageInfo_Matrix.Size(m)
|
|
|
+}
|
|
|
+func (m *Matrix) XXX_DiscardUnknown() {
|
|
|
+ xxx_messageInfo_Matrix.DiscardUnknown(m)
|
|
|
+}
|
|
|
+
|
|
|
+var xxx_messageInfo_Matrix proto.InternalMessageInfo
|
|
|
+
|
|
|
+func (m *Matrix) GetMatrix() []byte {
|
|
|
+ if m != nil {
|
|
|
+ return m.Matrix
|
|
|
+ }
|
|
|
+ return nil
|
|
|
+}
|
|
|
+
|
|
|
+type LayerMatrix struct {
|
|
|
+ ContentType LayerMatrix_ContentType `protobuf:"varint,1,opt,name=contentType,proto3,enum=remotecontrol.LayerMatrix_ContentType" json:"contentType,omitempty"`
|
|
|
+ Layer int32 `protobuf:"zigzag32,2,opt,name=layer,proto3" json:"layer,omitempty"`
|
|
|
+ Matrix *Matrix `protobuf:"bytes,3,opt,name=matrix,proto3" json:"matrix,omitempty"`
|
|
|
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
+ XXX_unrecognized []byte `json:"-"`
|
|
|
+ XXX_sizecache int32 `json:"-"`
|
|
|
+}
|
|
|
+
|
|
|
+func (m *LayerMatrix) Reset() { *m = LayerMatrix{} }
|
|
|
+func (m *LayerMatrix) String() string { return proto.CompactTextString(m) }
|
|
|
+func (*LayerMatrix) ProtoMessage() {}
|
|
|
+func (*LayerMatrix) Descriptor() ([]byte, []int) {
|
|
|
+ return fileDescriptor_9e7470c0107e56c6, []int{1}
|
|
|
+}
|
|
|
+
|
|
|
+func (m *LayerMatrix) XXX_Unmarshal(b []byte) error {
|
|
|
+ return xxx_messageInfo_LayerMatrix.Unmarshal(m, b)
|
|
|
+}
|
|
|
+func (m *LayerMatrix) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
+ return xxx_messageInfo_LayerMatrix.Marshal(b, m, deterministic)
|
|
|
+}
|
|
|
+func (m *LayerMatrix) XXX_Merge(src proto.Message) {
|
|
|
+ xxx_messageInfo_LayerMatrix.Merge(m, src)
|
|
|
+}
|
|
|
+func (m *LayerMatrix) XXX_Size() int {
|
|
|
+ return xxx_messageInfo_LayerMatrix.Size(m)
|
|
|
+}
|
|
|
+func (m *LayerMatrix) XXX_DiscardUnknown() {
|
|
|
+ xxx_messageInfo_LayerMatrix.DiscardUnknown(m)
|
|
|
+}
|
|
|
+
|
|
|
+var xxx_messageInfo_LayerMatrix proto.InternalMessageInfo
|
|
|
+
|
|
|
+func (m *LayerMatrix) GetContentType() LayerMatrix_ContentType {
|
|
|
+ if m != nil {
|
|
|
+ return m.ContentType
|
|
|
+ }
|
|
|
+ return LayerMatrix_Activations
|
|
|
+}
|
|
|
+
|
|
|
+func (m *LayerMatrix) GetLayer() int32 {
|
|
|
+ if m != nil {
|
|
|
+ return m.Layer
|
|
|
+ }
|
|
|
+ return 0
|
|
|
+}
|
|
|
+
|
|
|
+func (m *LayerMatrix) GetMatrix() *Matrix {
|
|
|
+ if m != nil {
|
|
|
+ return m.Matrix
|
|
|
+ }
|
|
|
+ return nil
|
|
|
+}
|
|
|
+
|
|
|
+type Configuration struct {
|
|
|
+ Sizes []int32 `protobuf:"zigzag32,1,rep,packed,name=sizes,proto3" json:"sizes,omitempty"`
|
|
|
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
+ XXX_unrecognized []byte `json:"-"`
|
|
|
+ XXX_sizecache int32 `json:"-"`
|
|
|
+}
|
|
|
+
|
|
|
+func (m *Configuration) Reset() { *m = Configuration{} }
|
|
|
+func (m *Configuration) String() string { return proto.CompactTextString(m) }
|
|
|
+func (*Configuration) ProtoMessage() {}
|
|
|
+func (*Configuration) Descriptor() ([]byte, []int) {
|
|
|
+ return fileDescriptor_9e7470c0107e56c6, []int{2}
|
|
|
+}
|
|
|
+
|
|
|
+func (m *Configuration) XXX_Unmarshal(b []byte) error {
|
|
|
+ return xxx_messageInfo_Configuration.Unmarshal(m, b)
|
|
|
+}
|
|
|
+func (m *Configuration) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
+ return xxx_messageInfo_Configuration.Marshal(b, m, deterministic)
|
|
|
+}
|
|
|
+func (m *Configuration) XXX_Merge(src proto.Message) {
|
|
|
+ xxx_messageInfo_Configuration.Merge(m, src)
|
|
|
+}
|
|
|
+func (m *Configuration) XXX_Size() int {
|
|
|
+ return xxx_messageInfo_Configuration.Size(m)
|
|
|
+}
|
|
|
+func (m *Configuration) XXX_DiscardUnknown() {
|
|
|
+ xxx_messageInfo_Configuration.DiscardUnknown(m)
|
|
|
+}
|
|
|
+
|
|
|
+var xxx_messageInfo_Configuration proto.InternalMessageInfo
|
|
|
+
|
|
|
+func (m *Configuration) GetSizes() []int32 {
|
|
|
+ if m != nil {
|
|
|
+ return m.Sizes
|
|
|
+ }
|
|
|
+ return nil
|
|
|
+}
|
|
|
+
|
|
|
+type None struct {
|
|
|
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
+ XXX_unrecognized []byte `json:"-"`
|
|
|
+ XXX_sizecache int32 `json:"-"`
|
|
|
+}
|
|
|
+
|
|
|
+func (m *None) Reset() { *m = None{} }
|
|
|
+func (m *None) String() string { return proto.CompactTextString(m) }
|
|
|
+func (*None) ProtoMessage() {}
|
|
|
+func (*None) Descriptor() ([]byte, []int) {
|
|
|
+ return fileDescriptor_9e7470c0107e56c6, []int{3}
|
|
|
+}
|
|
|
+
|
|
|
+func (m *None) XXX_Unmarshal(b []byte) error {
|
|
|
+ return xxx_messageInfo_None.Unmarshal(m, b)
|
|
|
+}
|
|
|
+func (m *None) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
+ return xxx_messageInfo_None.Marshal(b, m, deterministic)
|
|
|
+}
|
|
|
+func (m *None) XXX_Merge(src proto.Message) {
|
|
|
+ xxx_messageInfo_None.Merge(m, src)
|
|
|
+}
|
|
|
+func (m *None) XXX_Size() int {
|
|
|
+ return xxx_messageInfo_None.Size(m)
|
|
|
+}
|
|
|
+func (m *None) XXX_DiscardUnknown() {
|
|
|
+ xxx_messageInfo_None.DiscardUnknown(m)
|
|
|
+}
|
|
|
+
|
|
|
+var xxx_messageInfo_None proto.InternalMessageInfo
|
|
|
+
|
|
|
+func init() {
|
|
|
+ proto.RegisterEnum("remotecontrol.LayerMatrix_ContentType", LayerMatrix_ContentType_name, LayerMatrix_ContentType_value)
|
|
|
+ proto.RegisterType((*Matrix)(nil), "remotecontrol.Matrix")
|
|
|
+ proto.RegisterType((*LayerMatrix)(nil), "remotecontrol.LayerMatrix")
|
|
|
+ proto.RegisterType((*Configuration)(nil), "remotecontrol.Configuration")
|
|
|
+ proto.RegisterType((*None)(nil), "remotecontrol.None")
|
|
|
+}
|
|
|
+
|
|
|
+func init() { proto.RegisterFile("remotecontrol.proto", fileDescriptor_9e7470c0107e56c6) }
|
|
|
+
|
|
|
+var fileDescriptor_9e7470c0107e56c6 = []byte{
|
|
|
+ // 313 bytes of a gzipped FileDescriptorProto
|
|
|
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x92, 0xc1, 0x4b, 0xc3, 0x30,
|
|
|
+ 0x14, 0xc6, 0x9b, 0x4d, 0x3b, 0x78, 0x71, 0x5a, 0x33, 0x95, 0x51, 0x3c, 0x94, 0x80, 0xd2, 0x8b,
|
|
|
+ 0x45, 0xea, 0x41, 0x3c, 0x28, 0xb8, 0x1e, 0xf4, 0xa0, 0x22, 0x45, 0xf0, 0x5c, 0x6b, 0xac, 0x81,
|
|
|
+ 0xad, 0x19, 0x49, 0x14, 0xe7, 0xff, 0xa9, 0x7f, 0x8f, 0x34, 0x9d, 0xb5, 0x2d, 0xf5, 0xb2, 0x5b,
|
|
|
+ 0xde, 0xe3, 0xfb, 0xbe, 0xf7, 0xcb, 0x4b, 0x60, 0x24, 0xd9, 0x4c, 0x68, 0x96, 0x8a, 0x5c, 0x4b,
|
|
|
+ 0x31, 0x0d, 0xe6, 0x52, 0x68, 0x41, 0x86, 0x8d, 0x26, 0xf5, 0xc0, 0xbe, 0x4d, 0xb4, 0xe4, 0x1f,
|
|
|
+ 0x64, 0x0f, 0xec, 0x99, 0x39, 0x8d, 0x91, 0x87, 0xfc, 0x8d, 0x78, 0x59, 0xd1, 0x2f, 0x04, 0xf8,
|
|
|
+ 0x26, 0x59, 0x30, 0xb9, 0xd4, 0x5d, 0x03, 0x2e, 0xcc, 0x2c, 0xd7, 0x0f, 0x8b, 0x39, 0x33, 0xe2,
|
|
|
+ 0xcd, 0xf0, 0x30, 0x68, 0xce, 0xaa, 0x19, 0x82, 0xe8, 0x4f, 0x1d, 0xd7, 0xad, 0x64, 0x07, 0xd6,
|
|
|
+ 0xa7, 0x85, 0x6e, 0xdc, 0xf3, 0x90, 0xbf, 0x1d, 0x97, 0x05, 0x39, 0xaa, 0x38, 0xfa, 0x1e, 0xf2,
|
|
|
+ 0x71, 0xb8, 0xdb, 0x8a, 0x2e, 0x53, 0x2b, 0xbc, 0x53, 0xc0, 0xb5, 0x01, 0x64, 0x0b, 0xf0, 0x65,
|
|
|
+ 0xaa, 0xf9, 0x7b, 0xa2, 0xb9, 0xc8, 0x95, 0x63, 0x11, 0x0c, 0x83, 0x47, 0xc6, 0xb3, 0x57, 0xad,
|
|
|
+ 0x1c, 0x44, 0x00, 0xec, 0x09, 0x4f, 0x14, 0x53, 0x4e, 0x8f, 0x1e, 0xc0, 0x30, 0x12, 0xf9, 0x0b,
|
|
|
+ 0xcf, 0xde, 0xa4, 0x11, 0x17, 0x38, 0x8a, 0x7f, 0x32, 0x35, 0x46, 0x5e, 0xbf, 0xc0, 0x31, 0x05,
|
|
|
+ 0xb5, 0x61, 0xed, 0x4e, 0xe4, 0x2c, 0xfc, 0xee, 0xc1, 0x30, 0x36, 0x20, 0x51, 0x09, 0x42, 0xae,
|
|
|
+ 0xc0, 0xc9, 0x98, 0x6e, 0x66, 0x8c, 0x5a, 0xb0, 0x85, 0xd5, 0xdd, 0x6f, 0x35, 0x1b, 0x16, 0x6a,
|
|
|
+ 0x91, 0x49, 0x83, 0xb9, 0x3b, 0xc3, 0xfd, 0x7f, 0xc1, 0xd4, 0x3a, 0x46, 0xe4, 0xfc, 0xf7, 0x66,
|
|
|
+ 0xab, 0xd9, 0x2f, 0xaa, 0x2d, 0xad, 0xe6, 0x3f, 0x83, 0xc1, 0xbd, 0x64, 0xcf, 0x3c, 0xd5, 0xa4,
|
|
|
+ 0xfb, 0xbd, 0xdc, 0xee, 0x36, 0xb5, 0x9e, 0x6c, 0xf3, 0x2f, 0x4f, 0x7e, 0x02, 0x00, 0x00, 0xff,
|
|
|
+ 0xff, 0x89, 0xa6, 0x82, 0x97, 0xae, 0x02, 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
|
|
|
+
|
|
|
+// RemoteControlClient is the client API for RemoteControl service.
|
|
|
+//
|
|
|
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
|
+type RemoteControlClient interface {
|
|
|
+ GetConfiguration(ctx context.Context, in *None, opts ...grpc.CallOption) (*Configuration, error)
|
|
|
+ Activations(ctx context.Context, in *None, opts ...grpc.CallOption) (RemoteControl_ActivationsClient, error)
|
|
|
+ Biases(ctx context.Context, in *None, opts ...grpc.CallOption) (RemoteControl_BiasesClient, error)
|
|
|
+ Weights(ctx context.Context, in *None, opts ...grpc.CallOption) (RemoteControl_WeightsClient, error)
|
|
|
+ Predict(ctx context.Context, in *Matrix, opts ...grpc.CallOption) (*Matrix, error)
|
|
|
+}
|
|
|
+
|
|
|
+type remoteControlClient struct {
|
|
|
+ cc *grpc.ClientConn
|
|
|
+}
|
|
|
+
|
|
|
+func NewRemoteControlClient(cc *grpc.ClientConn) RemoteControlClient {
|
|
|
+ return &remoteControlClient{cc}
|
|
|
+}
|
|
|
+
|
|
|
+func (c *remoteControlClient) GetConfiguration(ctx context.Context, in *None, opts ...grpc.CallOption) (*Configuration, error) {
|
|
|
+ out := new(Configuration)
|
|
|
+ err := c.cc.Invoke(ctx, "/remotecontrol.RemoteControl/getConfiguration", in, out, opts...)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return out, nil
|
|
|
+}
|
|
|
+
|
|
|
+func (c *remoteControlClient) Activations(ctx context.Context, in *None, opts ...grpc.CallOption) (RemoteControl_ActivationsClient, error) {
|
|
|
+ stream, err := c.cc.NewStream(ctx, &_RemoteControl_serviceDesc.Streams[0], "/remotecontrol.RemoteControl/Activations", opts...)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ x := &remoteControlActivationsClient{stream}
|
|
|
+ if err := x.ClientStream.SendMsg(in); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ if err := x.ClientStream.CloseSend(); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return x, nil
|
|
|
+}
|
|
|
+
|
|
|
+type RemoteControl_ActivationsClient interface {
|
|
|
+ Recv() (*LayerMatrix, error)
|
|
|
+ grpc.ClientStream
|
|
|
+}
|
|
|
+
|
|
|
+type remoteControlActivationsClient struct {
|
|
|
+ grpc.ClientStream
|
|
|
+}
|
|
|
+
|
|
|
+func (x *remoteControlActivationsClient) Recv() (*LayerMatrix, error) {
|
|
|
+ m := new(LayerMatrix)
|
|
|
+ if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return m, nil
|
|
|
+}
|
|
|
+
|
|
|
+func (c *remoteControlClient) Biases(ctx context.Context, in *None, opts ...grpc.CallOption) (RemoteControl_BiasesClient, error) {
|
|
|
+ stream, err := c.cc.NewStream(ctx, &_RemoteControl_serviceDesc.Streams[1], "/remotecontrol.RemoteControl/Biases", opts...)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ x := &remoteControlBiasesClient{stream}
|
|
|
+ if err := x.ClientStream.SendMsg(in); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ if err := x.ClientStream.CloseSend(); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return x, nil
|
|
|
+}
|
|
|
+
|
|
|
+type RemoteControl_BiasesClient interface {
|
|
|
+ Recv() (*LayerMatrix, error)
|
|
|
+ grpc.ClientStream
|
|
|
+}
|
|
|
+
|
|
|
+type remoteControlBiasesClient struct {
|
|
|
+ grpc.ClientStream
|
|
|
+}
|
|
|
+
|
|
|
+func (x *remoteControlBiasesClient) Recv() (*LayerMatrix, error) {
|
|
|
+ m := new(LayerMatrix)
|
|
|
+ if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return m, nil
|
|
|
+}
|
|
|
+
|
|
|
+func (c *remoteControlClient) Weights(ctx context.Context, in *None, opts ...grpc.CallOption) (RemoteControl_WeightsClient, error) {
|
|
|
+ stream, err := c.cc.NewStream(ctx, &_RemoteControl_serviceDesc.Streams[2], "/remotecontrol.RemoteControl/Weights", opts...)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ x := &remoteControlWeightsClient{stream}
|
|
|
+ if err := x.ClientStream.SendMsg(in); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ if err := x.ClientStream.CloseSend(); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return x, nil
|
|
|
+}
|
|
|
+
|
|
|
+type RemoteControl_WeightsClient interface {
|
|
|
+ Recv() (*LayerMatrix, error)
|
|
|
+ grpc.ClientStream
|
|
|
+}
|
|
|
+
|
|
|
+type remoteControlWeightsClient struct {
|
|
|
+ grpc.ClientStream
|
|
|
+}
|
|
|
+
|
|
|
+func (x *remoteControlWeightsClient) Recv() (*LayerMatrix, error) {
|
|
|
+ m := new(LayerMatrix)
|
|
|
+ if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return m, nil
|
|
|
+}
|
|
|
+
|
|
|
+func (c *remoteControlClient) Predict(ctx context.Context, in *Matrix, opts ...grpc.CallOption) (*Matrix, error) {
|
|
|
+ out := new(Matrix)
|
|
|
+ err := c.cc.Invoke(ctx, "/remotecontrol.RemoteControl/Predict", in, out, opts...)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return out, nil
|
|
|
+}
|
|
|
+
|
|
|
+// RemoteControlServer is the server API for RemoteControl service.
|
|
|
+type RemoteControlServer interface {
|
|
|
+ GetConfiguration(context.Context, *None) (*Configuration, error)
|
|
|
+ Activations(*None, RemoteControl_ActivationsServer) error
|
|
|
+ Biases(*None, RemoteControl_BiasesServer) error
|
|
|
+ Weights(*None, RemoteControl_WeightsServer) error
|
|
|
+ Predict(context.Context, *Matrix) (*Matrix, error)
|
|
|
+}
|
|
|
+
|
|
|
+// UnimplementedRemoteControlServer can be embedded to have forward compatible implementations.
|
|
|
+type UnimplementedRemoteControlServer struct {
|
|
|
+}
|
|
|
+
|
|
|
+func (*UnimplementedRemoteControlServer) GetConfiguration(ctx context.Context, req *None) (*Configuration, error) {
|
|
|
+ return nil, status.Errorf(codes.Unimplemented, "method GetConfiguration not implemented")
|
|
|
+}
|
|
|
+func (*UnimplementedRemoteControlServer) Activations(req *None, srv RemoteControl_ActivationsServer) error {
|
|
|
+ return status.Errorf(codes.Unimplemented, "method Activations not implemented")
|
|
|
+}
|
|
|
+func (*UnimplementedRemoteControlServer) Biases(req *None, srv RemoteControl_BiasesServer) error {
|
|
|
+ return status.Errorf(codes.Unimplemented, "method Biases not implemented")
|
|
|
+}
|
|
|
+func (*UnimplementedRemoteControlServer) Weights(req *None, srv RemoteControl_WeightsServer) error {
|
|
|
+ return status.Errorf(codes.Unimplemented, "method Weights not implemented")
|
|
|
+}
|
|
|
+func (*UnimplementedRemoteControlServer) Predict(ctx context.Context, req *Matrix) (*Matrix, error) {
|
|
|
+ return nil, status.Errorf(codes.Unimplemented, "method Predict not implemented")
|
|
|
+}
|
|
|
+
|
|
|
+func RegisterRemoteControlServer(s *grpc.Server, srv RemoteControlServer) {
|
|
|
+ s.RegisterService(&_RemoteControl_serviceDesc, srv)
|
|
|
+}
|
|
|
+
|
|
|
+func _RemoteControl_GetConfiguration_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
+ in := new(None)
|
|
|
+ if err := dec(in); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ if interceptor == nil {
|
|
|
+ return srv.(RemoteControlServer).GetConfiguration(ctx, in)
|
|
|
+ }
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
+ Server: srv,
|
|
|
+ FullMethod: "/remotecontrol.RemoteControl/GetConfiguration",
|
|
|
+ }
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
+ return srv.(RemoteControlServer).GetConfiguration(ctx, req.(*None))
|
|
|
+ }
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
+}
|
|
|
+
|
|
|
+func _RemoteControl_Activations_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
|
+ m := new(None)
|
|
|
+ if err := stream.RecvMsg(m); err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ return srv.(RemoteControlServer).Activations(m, &remoteControlActivationsServer{stream})
|
|
|
+}
|
|
|
+
|
|
|
+type RemoteControl_ActivationsServer interface {
|
|
|
+ Send(*LayerMatrix) error
|
|
|
+ grpc.ServerStream
|
|
|
+}
|
|
|
+
|
|
|
+type remoteControlActivationsServer struct {
|
|
|
+ grpc.ServerStream
|
|
|
+}
|
|
|
+
|
|
|
+func (x *remoteControlActivationsServer) Send(m *LayerMatrix) error {
|
|
|
+ return x.ServerStream.SendMsg(m)
|
|
|
+}
|
|
|
+
|
|
|
+func _RemoteControl_Biases_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
|
+ m := new(None)
|
|
|
+ if err := stream.RecvMsg(m); err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ return srv.(RemoteControlServer).Biases(m, &remoteControlBiasesServer{stream})
|
|
|
+}
|
|
|
+
|
|
|
+type RemoteControl_BiasesServer interface {
|
|
|
+ Send(*LayerMatrix) error
|
|
|
+ grpc.ServerStream
|
|
|
+}
|
|
|
+
|
|
|
+type remoteControlBiasesServer struct {
|
|
|
+ grpc.ServerStream
|
|
|
+}
|
|
|
+
|
|
|
+func (x *remoteControlBiasesServer) Send(m *LayerMatrix) error {
|
|
|
+ return x.ServerStream.SendMsg(m)
|
|
|
+}
|
|
|
+
|
|
|
+func _RemoteControl_Weights_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
|
+ m := new(None)
|
|
|
+ if err := stream.RecvMsg(m); err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ return srv.(RemoteControlServer).Weights(m, &remoteControlWeightsServer{stream})
|
|
|
+}
|
|
|
+
|
|
|
+type RemoteControl_WeightsServer interface {
|
|
|
+ Send(*LayerMatrix) error
|
|
|
+ grpc.ServerStream
|
|
|
+}
|
|
|
+
|
|
|
+type remoteControlWeightsServer struct {
|
|
|
+ grpc.ServerStream
|
|
|
+}
|
|
|
+
|
|
|
+func (x *remoteControlWeightsServer) Send(m *LayerMatrix) error {
|
|
|
+ return x.ServerStream.SendMsg(m)
|
|
|
+}
|
|
|
+
|
|
|
+func _RemoteControl_Predict_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
+ in := new(Matrix)
|
|
|
+ if err := dec(in); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ if interceptor == nil {
|
|
|
+ return srv.(RemoteControlServer).Predict(ctx, in)
|
|
|
+ }
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
+ Server: srv,
|
|
|
+ FullMethod: "/remotecontrol.RemoteControl/Predict",
|
|
|
+ }
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
+ return srv.(RemoteControlServer).Predict(ctx, req.(*Matrix))
|
|
|
+ }
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
+}
|
|
|
+
|
|
|
+var _RemoteControl_serviceDesc = grpc.ServiceDesc{
|
|
|
+ ServiceName: "remotecontrol.RemoteControl",
|
|
|
+ HandlerType: (*RemoteControlServer)(nil),
|
|
|
+ Methods: []grpc.MethodDesc{
|
|
|
+ {
|
|
|
+ MethodName: "getConfiguration",
|
|
|
+ Handler: _RemoteControl_GetConfiguration_Handler,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ MethodName: "Predict",
|
|
|
+ Handler: _RemoteControl_Predict_Handler,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ Streams: []grpc.StreamDesc{
|
|
|
+ {
|
|
|
+ StreamName: "Activations",
|
|
|
+ Handler: _RemoteControl_Activations_Handler,
|
|
|
+ ServerStreams: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ StreamName: "Biases",
|
|
|
+ Handler: _RemoteControl_Biases_Handler,
|
|
|
+ ServerStreams: true,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ StreamName: "Weights",
|
|
|
+ Handler: _RemoteControl_Weights_Handler,
|
|
|
+ ServerStreams: true,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ Metadata: "remotecontrol.proto",
|
|
|
+}
|