123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424 |
- // 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 UnitInfo 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 *UnitInfo) Reset() { *m = UnitInfo{} }
- func (m *UnitInfo) String() string { return proto.CompactTextString(m) }
- func (*UnitInfo) ProtoMessage() {}
- func (*UnitInfo) Descriptor() ([]byte, []int) {
- return fileDescriptor_3cfb3b8ec240c376, []int{0}
- }
- func (m *UnitInfo) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_UnitInfo.Unmarshal(m, b)
- }
- func (m *UnitInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_UnitInfo.Marshal(b, m, deterministic)
- }
- func (m *UnitInfo) XXX_Merge(src proto.Message) {
- xxx_messageInfo_UnitInfo.Merge(m, src)
- }
- func (m *UnitInfo) XXX_Size() int {
- return xxx_messageInfo_UnitInfo.Size(m)
- }
- func (m *UnitInfo) XXX_DiscardUnknown() {
- xxx_messageInfo_UnitInfo.DiscardUnknown(m)
- }
- var xxx_messageInfo_UnitInfo proto.InternalMessageInfo
- func (m *UnitInfo) GetUrl() string {
- if m != nil {
- return m.Url
- }
- return ""
- }
- func (m *UnitInfo) GetAvailableThreads() int32 {
- if m != nil {
- return m.AvailableThreads
- }
- return 0
- }
- type UnitInfos struct {
- List []*UnitInfo `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
- }
- func (m *UnitInfos) Reset() { *m = UnitInfos{} }
- func (m *UnitInfos) String() string { return proto.CompactTextString(m) }
- func (*UnitInfos) ProtoMessage() {}
- func (*UnitInfos) Descriptor() ([]byte, []int) {
- return fileDescriptor_3cfb3b8ec240c376, []int{1}
- }
- func (m *UnitInfos) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_UnitInfos.Unmarshal(m, b)
- }
- func (m *UnitInfos) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_UnitInfos.Marshal(b, m, deterministic)
- }
- func (m *UnitInfos) XXX_Merge(src proto.Message) {
- xxx_messageInfo_UnitInfos.Merge(m, src)
- }
- func (m *UnitInfos) XXX_Size() int {
- return xxx_messageInfo_UnitInfos.Size(m)
- }
- func (m *UnitInfos) XXX_DiscardUnknown() {
- xxx_messageInfo_UnitInfos.DiscardUnknown(m)
- }
- var xxx_messageInfo_UnitInfos proto.InternalMessageInfo
- func (m *UnitInfos) GetList() []*UnitInfo {
- if m != nil {
- return m.List
- }
- return nil
- }
- 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_3cfb3b8ec240c376, []int{2}
- }
- 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 DataSet struct {
- Biases []*Matrix `protobuf:"bytes,1,rep,name=biases,proto3" json:"biases,omitempty"`
- Weights []*Matrix `protobuf:"bytes,2,rep,name=weights,proto3" json:"weights,omitempty"`
- Data []*Matrix `protobuf:"bytes,3,rep,name=data,proto3" json:"data,omitempty"`
- Result []*Matrix `protobuf:"bytes,4,rep,name=result,proto3" json:"result,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
- }
- func (m *DataSet) Reset() { *m = DataSet{} }
- func (m *DataSet) String() string { return proto.CompactTextString(m) }
- func (*DataSet) ProtoMessage() {}
- func (*DataSet) Descriptor() ([]byte, []int) {
- return fileDescriptor_3cfb3b8ec240c376, []int{3}
- }
- func (m *DataSet) XXX_Unmarshal(b []byte) error {
- return xxx_messageInfo_DataSet.Unmarshal(m, b)
- }
- func (m *DataSet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- return xxx_messageInfo_DataSet.Marshal(b, m, deterministic)
- }
- func (m *DataSet) XXX_Merge(src proto.Message) {
- xxx_messageInfo_DataSet.Merge(m, src)
- }
- func (m *DataSet) XXX_Size() int {
- return xxx_messageInfo_DataSet.Size(m)
- }
- func (m *DataSet) XXX_DiscardUnknown() {
- xxx_messageInfo_DataSet.DiscardUnknown(m)
- }
- var xxx_messageInfo_DataSet proto.InternalMessageInfo
- func (m *DataSet) GetBiases() []*Matrix {
- if m != nil {
- return m.Biases
- }
- return nil
- }
- func (m *DataSet) GetWeights() []*Matrix {
- if m != nil {
- return m.Weights
- }
- return nil
- }
- func (m *DataSet) GetData() []*Matrix {
- if m != nil {
- return m.Data
- }
- return nil
- }
- func (m *DataSet) GetResult() []*Matrix {
- if m != nil {
- return m.Result
- }
- return nil
- }
- func init() {
- proto.RegisterType((*UnitInfo)(nil), "cluster.UnitInfo")
- proto.RegisterType((*UnitInfos)(nil), "cluster.UnitInfos")
- proto.RegisterType((*Matrix)(nil), "cluster.Matrix")
- proto.RegisterType((*DataSet)(nil), "cluster.DataSet")
- }
- func init() { proto.RegisterFile("cluster.proto", fileDescriptor_3cfb3b8ec240c376) }
- var fileDescriptor_3cfb3b8ec240c376 = []byte{
- // 290 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x91, 0xb1, 0x4e, 0xc3, 0x30,
- 0x10, 0x86, 0x6b, 0x52, 0x25, 0xed, 0x01, 0x22, 0xb1, 0x10, 0x8a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 0xc1, 0x3a, 0xd8, 0x48, 0x5b, 0x69, 0x8c, 0x87, 0xff, 0x04, 0x37, 0x38, 0xbb, 0x87, 0xc3, 0xb9,
- 0xac, 0x8c, 0xd0, 0x73, 0x89, 0xeb, 0xd2, 0xbc, 0x5d, 0x37, 0x32, 0x7a, 0x09, 0x23, 0x2e, 0x97,
- 0xca, 0xd5, 0xfd, 0x63, 0x4c, 0xfa, 0x23, 0x36, 0x38, 0x27, 0xd9, 0x15, 0x44, 0xbf, 0xdc, 0x6a,
- 0x48, 0xa7, 0xe0, 0xf1, 0xaa, 0xa0, 0xe1, 0xe6, 0x49, 0x7b, 0x9d, 0xc9, 0xdf, 0xa5, 0xd8, 0x20,
- 0xf7, 0xdd, 0x67, 0x5f, 0xfc, 0x04, 0x00, 0x00, 0xff, 0xff, 0xa9, 0xdf, 0x40, 0x3f, 0xfd, 0x01,
- 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 *UnitInfo, 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 *UnitInfo, 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() (*UnitInfo, error)
- grpc.ClientStream
- }
- type neuralNetworkClusterRegisterClient struct {
- grpc.ClientStream
- }
- func (x *neuralNetworkClusterRegisterClient) Recv() (*UnitInfo, error) {
- m := new(UnitInfo)
- 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(*UnitInfo, NeuralNetworkCluster_RegisterServer) error
- }
- // UnimplementedNeuralNetworkClusterServer can be embedded to have forward compatible implementations.
- type UnimplementedNeuralNetworkClusterServer struct {
- }
- func (*UnimplementedNeuralNetworkClusterServer) Register(req *UnitInfo, 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(UnitInfo)
- if err := stream.RecvMsg(m); err != nil {
- return err
- }
- return srv.(NeuralNetworkClusterServer).Register(m, &neuralNetworkClusterRegisterServer{stream})
- }
- type NeuralNetworkCluster_RegisterServer interface {
- Send(*UnitInfo) error
- grpc.ServerStream
- }
- type neuralNetworkClusterRegisterServer struct {
- grpc.ServerStream
- }
- func (x *neuralNetworkClusterRegisterServer) Send(m *UnitInfo) 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",
- }
- // NeuralNetworkUnitClient is the client API for NeuralNetworkUnit service.
- //
- // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
- type NeuralNetworkUnitClient interface {
- Run(ctx context.Context, in *DataSet, opts ...grpc.CallOption) (*Matrix, error)
- }
- type neuralNetworkUnitClient struct {
- cc grpc.ClientConnInterface
- }
- func NewNeuralNetworkUnitClient(cc grpc.ClientConnInterface) NeuralNetworkUnitClient {
- return &neuralNetworkUnitClient{cc}
- }
- func (c *neuralNetworkUnitClient) Run(ctx context.Context, in *DataSet, opts ...grpc.CallOption) (*Matrix, error) {
- out := new(Matrix)
- err := c.cc.Invoke(ctx, "/cluster.NeuralNetworkUnit/Run", in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // NeuralNetworkUnitServer is the server API for NeuralNetworkUnit service.
- type NeuralNetworkUnitServer interface {
- Run(context.Context, *DataSet) (*Matrix, error)
- }
- // UnimplementedNeuralNetworkUnitServer can be embedded to have forward compatible implementations.
- type UnimplementedNeuralNetworkUnitServer struct {
- }
- func (*UnimplementedNeuralNetworkUnitServer) Run(ctx context.Context, req *DataSet) (*Matrix, error) {
- return nil, status.Errorf(codes.Unimplemented, "method Run not implemented")
- }
- func RegisterNeuralNetworkUnitServer(s *grpc.Server, srv NeuralNetworkUnitServer) {
- s.RegisterService(&_NeuralNetworkUnit_serviceDesc, srv)
- }
- func _NeuralNetworkUnit_Run_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(DataSet)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(NeuralNetworkUnitServer).Run(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: "/cluster.NeuralNetworkUnit/Run",
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(NeuralNetworkUnitServer).Run(ctx, req.(*DataSet))
- }
- return interceptor(ctx, in, info, handler)
- }
- var _NeuralNetworkUnit_serviceDesc = grpc.ServiceDesc{
- ServiceName: "cluster.NeuralNetworkUnit",
- HandlerType: (*NeuralNetworkUnitServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "Run",
- Handler: _NeuralNetworkUnit_Run_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "cluster.proto",
- }
|