|
@@ -0,0 +1,240 @@
|
|
|
+// Code generated by protoc-gen-go. DO NOT EDIT.
|
|
|
+// source: cluster.proto
|
|
|
+
|
|
|
+package cluster
|
|
|
+
|
|
|
+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 Unit struct {
|
|
|
+ Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
|
|
|
+ AvailableThreads int32 `protobuf:"zigzag32,2,opt,name=availableThreads,proto3" json:"availableThreads,omitempty"`
|
|
|
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
+ XXX_unrecognized []byte `json:"-"`
|
|
|
+ XXX_sizecache int32 `json:"-"`
|
|
|
+}
|
|
|
+
|
|
|
+func (m *Unit) Reset() { *m = Unit{} }
|
|
|
+func (m *Unit) String() string { return proto.CompactTextString(m) }
|
|
|
+func (*Unit) ProtoMessage() {}
|
|
|
+func (*Unit) Descriptor() ([]byte, []int) {
|
|
|
+ return fileDescriptor_3cfb3b8ec240c376, []int{0}
|
|
|
+}
|
|
|
+
|
|
|
+func (m *Unit) XXX_Unmarshal(b []byte) error {
|
|
|
+ return xxx_messageInfo_Unit.Unmarshal(m, b)
|
|
|
+}
|
|
|
+func (m *Unit) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
+ return xxx_messageInfo_Unit.Marshal(b, m, deterministic)
|
|
|
+}
|
|
|
+func (m *Unit) XXX_Merge(src proto.Message) {
|
|
|
+ xxx_messageInfo_Unit.Merge(m, src)
|
|
|
+}
|
|
|
+func (m *Unit) XXX_Size() int {
|
|
|
+ return xxx_messageInfo_Unit.Size(m)
|
|
|
+}
|
|
|
+func (m *Unit) XXX_DiscardUnknown() {
|
|
|
+ xxx_messageInfo_Unit.DiscardUnknown(m)
|
|
|
+}
|
|
|
+
|
|
|
+var xxx_messageInfo_Unit proto.InternalMessageInfo
|
|
|
+
|
|
|
+func (m *Unit) GetUrl() string {
|
|
|
+ if m != nil {
|
|
|
+ return m.Url
|
|
|
+ }
|
|
|
+ return ""
|
|
|
+}
|
|
|
+
|
|
|
+func (m *Unit) GetAvailableThreads() int32 {
|
|
|
+ if m != nil {
|
|
|
+ return m.AvailableThreads
|
|
|
+ }
|
|
|
+ return 0
|
|
|
+}
|
|
|
+
|
|
|
+type Units struct {
|
|
|
+ List []*Unit `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
|
|
|
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
|
|
|
+ XXX_unrecognized []byte `json:"-"`
|
|
|
+ XXX_sizecache int32 `json:"-"`
|
|
|
+}
|
|
|
+
|
|
|
+func (m *Units) Reset() { *m = Units{} }
|
|
|
+func (m *Units) String() string { return proto.CompactTextString(m) }
|
|
|
+func (*Units) ProtoMessage() {}
|
|
|
+func (*Units) Descriptor() ([]byte, []int) {
|
|
|
+ return fileDescriptor_3cfb3b8ec240c376, []int{1}
|
|
|
+}
|
|
|
+
|
|
|
+func (m *Units) XXX_Unmarshal(b []byte) error {
|
|
|
+ return xxx_messageInfo_Units.Unmarshal(m, b)
|
|
|
+}
|
|
|
+func (m *Units) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
|
|
|
+ return xxx_messageInfo_Units.Marshal(b, m, deterministic)
|
|
|
+}
|
|
|
+func (m *Units) XXX_Merge(src proto.Message) {
|
|
|
+ xxx_messageInfo_Units.Merge(m, src)
|
|
|
+}
|
|
|
+func (m *Units) XXX_Size() int {
|
|
|
+ return xxx_messageInfo_Units.Size(m)
|
|
|
+}
|
|
|
+func (m *Units) XXX_DiscardUnknown() {
|
|
|
+ xxx_messageInfo_Units.DiscardUnknown(m)
|
|
|
+}
|
|
|
+
|
|
|
+var xxx_messageInfo_Units proto.InternalMessageInfo
|
|
|
+
|
|
|
+func (m *Units) GetList() []*Unit {
|
|
|
+ if m != nil {
|
|
|
+ return m.List
|
|
|
+ }
|
|
|
+ return nil
|
|
|
+}
|
|
|
+
|
|
|
+func init() {
|
|
|
+ proto.RegisterType((*Unit)(nil), "cluster.Unit")
|
|
|
+ proto.RegisterType((*Units)(nil), "cluster.Units")
|
|
|
+}
|
|
|
+
|
|
|
+func init() { proto.RegisterFile("cluster.proto", fileDescriptor_3cfb3b8ec240c376) }
|
|
|
+
|
|
|
+var fileDescriptor_3cfb3b8ec240c376 = []byte{
|
|
|
+ // 173 bytes of a gzipped FileDescriptorProto
|
|
|
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x4d, 0xce, 0x29, 0x2d,
|
|
|
+ 0x2e, 0x49, 0x2d, 0xd2, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x62, 0x87, 0x72, 0x95, 0x5c, 0xb8,
|
|
|
+ 0x58, 0x42, 0xf3, 0x32, 0x4b, 0x84, 0x04, 0xb8, 0x98, 0x4b, 0x8b, 0x72, 0x24, 0x18, 0x15, 0x18,
|
|
|
+ 0x35, 0x38, 0x83, 0x40, 0x4c, 0x21, 0x2d, 0x2e, 0x81, 0xc4, 0xb2, 0xc4, 0xcc, 0x9c, 0xc4, 0xa4,
|
|
|
+ 0x9c, 0xd4, 0x90, 0x8c, 0xa2, 0xd4, 0xc4, 0x94, 0x62, 0x09, 0x26, 0x05, 0x46, 0x0d, 0xc1, 0x20,
|
|
|
+ 0x0c, 0x71, 0x25, 0x2d, 0x2e, 0x56, 0x90, 0x29, 0xc5, 0x42, 0x8a, 0x5c, 0x2c, 0x39, 0x99, 0xc5,
|
|
|
+ 0x25, 0x12, 0x8c, 0x0a, 0xcc, 0x1a, 0xdc, 0x46, 0xbc, 0x7a, 0x30, 0x5b, 0x41, 0xb2, 0x41, 0x60,
|
|
|
+ 0x29, 0x23, 0x57, 0x2e, 0x11, 0xbf, 0xd4, 0xd2, 0xa2, 0xc4, 0x1c, 0xbf, 0xd4, 0x92, 0xf2, 0xfc,
|
|
|
+ 0xa2, 0x6c, 0x67, 0x88, 0x12, 0x21, 0x5d, 0x2e, 0x8e, 0xa0, 0xd4, 0xf4, 0x4c, 0x30, 0x1b, 0x55,
|
|
|
+ 0xa3, 0x14, 0x1f, 0x0a, 0xb7, 0x58, 0x89, 0xc1, 0x80, 0x31, 0x89, 0x0d, 0xec, 0x11, 0x63, 0x40,
|
|
|
+ 0x00, 0x00, 0x00, 0xff, 0xff, 0x5f, 0x84, 0xe4, 0x41, 0xd9, 0x00, 0x00, 0x00,
|
|
|
+}
|
|
|
+
|
|
|
+// Reference imports to suppress errors if they are not otherwise used.
|
|
|
+var _ context.Context
|
|
|
+var _ grpc.ClientConnInterface
|
|
|
+
|
|
|
+// 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.SupportPackageIsVersion6
|
|
|
+
|
|
|
+// NeuralNetworkClusterClient is the client API for NeuralNetworkCluster service.
|
|
|
+//
|
|
|
+// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
|
|
|
+type NeuralNetworkClusterClient interface {
|
|
|
+ Register(ctx context.Context, in *Unit, opts ...grpc.CallOption) (NeuralNetworkCluster_RegisterClient, error)
|
|
|
+}
|
|
|
+
|
|
|
+type neuralNetworkClusterClient struct {
|
|
|
+ cc grpc.ClientConnInterface
|
|
|
+}
|
|
|
+
|
|
|
+func NewNeuralNetworkClusterClient(cc grpc.ClientConnInterface) NeuralNetworkClusterClient {
|
|
|
+ return &neuralNetworkClusterClient{cc}
|
|
|
+}
|
|
|
+
|
|
|
+func (c *neuralNetworkClusterClient) Register(ctx context.Context, in *Unit, opts ...grpc.CallOption) (NeuralNetworkCluster_RegisterClient, error) {
|
|
|
+ stream, err := c.cc.NewStream(ctx, &_NeuralNetworkCluster_serviceDesc.Streams[0], "/cluster.NeuralNetworkCluster/Register", opts...)
|
|
|
+ if err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ x := &neuralNetworkClusterRegisterClient{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 NeuralNetworkCluster_RegisterClient interface {
|
|
|
+ Recv() (*Units, error)
|
|
|
+ grpc.ClientStream
|
|
|
+}
|
|
|
+
|
|
|
+type neuralNetworkClusterRegisterClient struct {
|
|
|
+ grpc.ClientStream
|
|
|
+}
|
|
|
+
|
|
|
+func (x *neuralNetworkClusterRegisterClient) Recv() (*Units, error) {
|
|
|
+ m := new(Units)
|
|
|
+ if err := x.ClientStream.RecvMsg(m); err != nil {
|
|
|
+ return nil, err
|
|
|
+ }
|
|
|
+ return m, nil
|
|
|
+}
|
|
|
+
|
|
|
+// NeuralNetworkClusterServer is the server API for NeuralNetworkCluster service.
|
|
|
+type NeuralNetworkClusterServer interface {
|
|
|
+ Register(*Unit, NeuralNetworkCluster_RegisterServer) error
|
|
|
+}
|
|
|
+
|
|
|
+// UnimplementedNeuralNetworkClusterServer can be embedded to have forward compatible implementations.
|
|
|
+type UnimplementedNeuralNetworkClusterServer struct {
|
|
|
+}
|
|
|
+
|
|
|
+func (*UnimplementedNeuralNetworkClusterServer) Register(req *Unit, srv NeuralNetworkCluster_RegisterServer) error {
|
|
|
+ return status.Errorf(codes.Unimplemented, "method Register not implemented")
|
|
|
+}
|
|
|
+
|
|
|
+func RegisterNeuralNetworkClusterServer(s *grpc.Server, srv NeuralNetworkClusterServer) {
|
|
|
+ s.RegisterService(&_NeuralNetworkCluster_serviceDesc, srv)
|
|
|
+}
|
|
|
+
|
|
|
+func _NeuralNetworkCluster_Register_Handler(srv interface{}, stream grpc.ServerStream) error {
|
|
|
+ m := new(Unit)
|
|
|
+ if err := stream.RecvMsg(m); err != nil {
|
|
|
+ return err
|
|
|
+ }
|
|
|
+ return srv.(NeuralNetworkClusterServer).Register(m, &neuralNetworkClusterRegisterServer{stream})
|
|
|
+}
|
|
|
+
|
|
|
+type NeuralNetworkCluster_RegisterServer interface {
|
|
|
+ Send(*Units) error
|
|
|
+ grpc.ServerStream
|
|
|
+}
|
|
|
+
|
|
|
+type neuralNetworkClusterRegisterServer struct {
|
|
|
+ grpc.ServerStream
|
|
|
+}
|
|
|
+
|
|
|
+func (x *neuralNetworkClusterRegisterServer) Send(m *Units) error {
|
|
|
+ return x.ServerStream.SendMsg(m)
|
|
|
+}
|
|
|
+
|
|
|
+var _NeuralNetworkCluster_serviceDesc = grpc.ServiceDesc{
|
|
|
+ ServiceName: "cluster.NeuralNetworkCluster",
|
|
|
+ HandlerType: (*NeuralNetworkClusterServer)(nil),
|
|
|
+ Methods: []grpc.MethodDesc{},
|
|
|
+ Streams: []grpc.StreamDesc{
|
|
|
+ {
|
|
|
+ StreamName: "Register",
|
|
|
+ Handler: _NeuralNetworkCluster_Register_Handler,
|
|
|
+ ServerStreams: true,
|
|
|
+ },
|
|
|
+ },
|
|
|
+ Metadata: "cluster.proto",
|
|
|
+}
|