 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- Variables
- func RegisterSyncAppServer(s grpc.ServiceRegistrar, srv SyncAppServer)
- type AppStatus
- func (*AppStatus) Descriptor() ([]byte, []int)deprecated
- func (x *AppStatus) GetAddr() string
- func (x *AppStatus) GetAppOrigin() string
- func (x *AppStatus) GetAveragePower() float32
- func (x *AppStatus) GetCpuInfo() string
- func (x *AppStatus) GetGpuInfo() string
- func (x *AppStatus) GetGuageHeight() uint64
- func (x *AppStatus) GetGuageMax() uint64
- func (x *AppStatus) GetMac() string
- func (x *AppStatus) GetMemInfo() string
- func (x *AppStatus) GetModelHash() string
- func (x *AppStatus) GetName() string
- func (x *AppStatus) GetNodeId() string
- func (x *AppStatus) GetRelay() string
- func (x *AppStatus) GetRelayProxyPort() uint64
- func (x *AppStatus) GetStartupTime() uint64
- func (x *AppStatus) GetUptime() uint64
- func (x *AppStatus) GetVersion() string
- func (*AppStatus) ProtoMessage()
- func (x *AppStatus) ProtoReflect() protoreflect.Message
- func (x *AppStatus) Reset()
- func (x *AppStatus) String() string
 
- type Data
- type GetDataRequest
- type PostPeerStatusRequest
- func (*PostPeerStatusRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PostPeerStatusRequest) GetNodeId() string
- func (*PostPeerStatusRequest) ProtoMessage()
- func (x *PostPeerStatusRequest) ProtoReflect() protoreflect.Message
- func (x *PostPeerStatusRequest) Reset()
- func (x *PostPeerStatusRequest) String() string
 
- type Result
- type SyncAppClient
- type SyncAppServer
- type SyncApp_GetDataClient
- type SyncApp_GetDataServer
- type SyncApp_PostAppStatusClient
- type SyncApp_PostAppStatusServer
- type UnimplementedSyncAppServer
- type UnsafeSyncAppServer
Constants ¶
const ( SyncApp_PostAppStatus_FullMethodName = "/v1.SyncApp/PostAppStatus" SyncApp_GetData_FullMethodName = "/v1.SyncApp/GetData" SyncApp_GetStatus_FullMethodName = "/v1.SyncApp/GetStatus" )
Variables ¶
var File_core_application_proto_syncer_proto protoreflect.FileDescriptor
    var SyncApp_ServiceDesc = grpc.ServiceDesc{ ServiceName: "v1.SyncApp", HandlerType: (*SyncAppServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetStatus", Handler: _SyncApp_GetStatus_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "PostAppStatus", Handler: _SyncApp_PostAppStatus_Handler, ServerStreams: true, }, { StreamName: "GetData", Handler: _SyncApp_GetData_Handler, ServerStreams: true, }, }, Metadata: "core/application/proto/syncer.proto", }
SyncApp_ServiceDesc is the grpc.ServiceDesc for SyncApp service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSyncAppServer ¶
func RegisterSyncAppServer(s grpc.ServiceRegistrar, srv SyncAppServer)
Types ¶
type AppStatus ¶
type AppStatus struct {
	// app name
	Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	// app startup time
	StartupTime uint64 `protobuf:"varint,2,opt,name=startup_time,json=startupTime,proto3" json:"startup_time,omitempty"`
	// app uptime
	Uptime uint64 `protobuf:"varint,3,opt,name=uptime,proto3" json:"uptime,omitempty"`
	// amount of slots currently occupying the app
	GuageHeight uint64 `protobuf:"varint,4,opt,name=guage_height,json=guageHeight,proto3" json:"guage_height,omitempty"`
	// max limit
	GuageMax uint64 `protobuf:"varint,5,opt,name=guage_max,json=guageMax,proto3" json:"guage_max,omitempty"`
	// relay addr string
	Relay string `protobuf:"bytes,6,opt,name=relay,proto3" json:"relay,omitempty"`
	// PeerID
	NodeId string `protobuf:"bytes,7,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
	// Addr
	Addr string `protobuf:"bytes,8,opt,name=addr,proto3" json:"addr,omitempty"`
	// App origin name
	AppOrigin string `protobuf:"bytes,9,opt,name=app_origin,json=appOrigin,proto3" json:"app_origin,omitempty"`
	// ai model hash string
	ModelHash string `protobuf:"bytes,10,opt,name=model_hash,json=modelHash,proto3" json:"model_hash,omitempty"`
	// mac addr
	Mac string `protobuf:"bytes,11,opt,name=mac,proto3" json:"mac,omitempty"`
	// memory info
	MemInfo string `protobuf:"bytes,12,opt,name=memInfo,proto3" json:"memInfo,omitempty"`
	// cpu info
	CpuInfo string `protobuf:"bytes,13,opt,name=cpu_info,json=cpuInfo,proto3" json:"cpu_info,omitempty"`
	// average e-power
	AveragePower float32 `protobuf:"fixed32,14,opt,name=average_power,json=averagePower,proto3" json:"average_power,omitempty"`
	// gpu info
	GpuInfo string `protobuf:"bytes,15,opt,name=gpu_info,json=gpuInfo,proto3" json:"gpu_info,omitempty"`
	// version
	Version string `protobuf:"bytes,16,opt,name=version,proto3" json:"version,omitempty"`
	// relay proxy port
	RelayProxyPort uint64 `protobuf:"varint,17,opt,name=relay_proxy_port,json=relayProxyPort,proto3" json:"relay_proxy_port,omitempty"`
	// contains filtered or unexported fields
}
    AppStatus contains app peer status
        
          
            func (*AppStatus) Descriptor
            deprecated
            
          
  
    
  
      
      
    func (*AppStatus) GetAppOrigin ¶
func (*AppStatus) GetAveragePower ¶
func (*AppStatus) GetCpuInfo ¶
func (*AppStatus) GetGpuInfo ¶
func (*AppStatus) GetGuageHeight ¶
func (*AppStatus) GetGuageMax ¶
func (*AppStatus) GetMemInfo ¶
func (*AppStatus) GetModelHash ¶
func (*AppStatus) GetRelayProxyPort ¶
func (*AppStatus) GetStartupTime ¶
func (*AppStatus) GetVersion ¶
func (*AppStatus) ProtoMessage ¶
func (*AppStatus) ProtoMessage()
func (*AppStatus) ProtoReflect ¶
func (x *AppStatus) ProtoReflect() protoreflect.Message
type Data ¶
type Data struct {
	// map[string]*[]byte
	Data map[string][]byte `` /* 149-byte string literal not displayed */
	// contains filtered or unexported fields
}
    Data contains app data as []byte
        
          
            func (*Data) Descriptor
            deprecated
            
          
  
    
  
      
      
    func (*Data) ProtoMessage ¶
func (*Data) ProtoMessage()
func (*Data) ProtoReflect ¶
func (x *Data) ProtoReflect() protoreflect.Message
type GetDataRequest ¶
type GetDataRequest struct {
	// The hash of Data to sync
	DataHash string `protobuf:"bytes,1,opt,name=dataHash,proto3" json:"dataHash,omitempty"`
	// contains filtered or unexported fields
}
    GetDataRequest is a request for GetData
        
          
            func (*GetDataRequest) Descriptor
            deprecated
            
          
  
    
  
      
      func (*GetDataRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetDataRequest.ProtoReflect.Descriptor instead.
func (*GetDataRequest) GetDataHash ¶
func (x *GetDataRequest) GetDataHash() string
func (*GetDataRequest) ProtoMessage ¶
func (*GetDataRequest) ProtoMessage()
func (*GetDataRequest) ProtoReflect ¶
func (x *GetDataRequest) ProtoReflect() protoreflect.Message
func (*GetDataRequest) Reset ¶
func (x *GetDataRequest) Reset()
func (*GetDataRequest) String ¶
func (x *GetDataRequest) String() string
type PostPeerStatusRequest ¶
type PostPeerStatusRequest struct {
	// The PeerStatus
	NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"`
	// contains filtered or unexported fields
}
    PostPeerStatusRequest is a request for post poc
        
          
            func (*PostPeerStatusRequest) Descriptor
            deprecated
            
          
  
    
  
      
      func (*PostPeerStatusRequest) Descriptor() ([]byte, []int)
Deprecated: Use PostPeerStatusRequest.ProtoReflect.Descriptor instead.
func (*PostPeerStatusRequest) GetNodeId ¶
func (x *PostPeerStatusRequest) GetNodeId() string
func (*PostPeerStatusRequest) ProtoMessage ¶
func (*PostPeerStatusRequest) ProtoMessage()
func (*PostPeerStatusRequest) ProtoReflect ¶
func (x *PostPeerStatusRequest) ProtoReflect() protoreflect.Message
func (*PostPeerStatusRequest) Reset ¶
func (x *PostPeerStatusRequest) Reset()
func (*PostPeerStatusRequest) String ¶
func (x *PostPeerStatusRequest) String() string
type Result ¶
type Result struct {
	Data string `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
	// contains filtered or unexported fields
}
    
        
          
            func (*Result) Descriptor
            deprecated
            
          
  
    
  
      
      
    func (*Result) ProtoMessage ¶
func (*Result) ProtoMessage()
func (*Result) ProtoReflect ¶
func (x *Result) ProtoReflect() protoreflect.Message
type SyncAppClient ¶
type SyncAppClient interface {
	PostAppStatus(ctx context.Context, in *PostPeerStatusRequest, opts ...grpc.CallOption) (SyncApp_PostAppStatusClient, error)
	// Returns stream of data beginning specified from
	GetData(ctx context.Context, in *GetDataRequest, opts ...grpc.CallOption) (SyncApp_GetDataClient, error)
	// Returns app peer's status
	GetStatus(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*AppStatus, error)
}
    SyncAppClient is the client API for SyncApp service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewSyncAppClient ¶
func NewSyncAppClient(cc grpc.ClientConnInterface) SyncAppClient
type SyncAppServer ¶
type SyncAppServer interface {
	PostAppStatus(*PostPeerStatusRequest, SyncApp_PostAppStatusServer) error
	// Returns stream of data beginning specified from
	GetData(*GetDataRequest, SyncApp_GetDataServer) error
	// Returns app peer's status
	GetStatus(context.Context, *emptypb.Empty) (*AppStatus, error)
	// contains filtered or unexported methods
}
    SyncAppServer is the server API for SyncApp service. All implementations must embed UnimplementedSyncAppServer for forward compatibility
type SyncApp_GetDataClient ¶
type SyncApp_GetDataClient interface {
	Recv() (*Data, error)
	grpc.ClientStream
}
    type SyncApp_GetDataServer ¶
type SyncApp_GetDataServer interface {
	Send(*Data) error
	grpc.ServerStream
}
    type SyncApp_PostAppStatusClient ¶
type SyncApp_PostAppStatusClient interface {
	Recv() (*Result, error)
	grpc.ClientStream
}
    type SyncApp_PostAppStatusServer ¶
type SyncApp_PostAppStatusServer interface {
	Send(*Result) error
	grpc.ServerStream
}
    type UnimplementedSyncAppServer ¶
type UnimplementedSyncAppServer struct {
}
    UnimplementedSyncAppServer must be embedded to have forward compatible implementations.
func (UnimplementedSyncAppServer) GetData ¶
func (UnimplementedSyncAppServer) GetData(*GetDataRequest, SyncApp_GetDataServer) error
func (UnimplementedSyncAppServer) PostAppStatus ¶
func (UnimplementedSyncAppServer) PostAppStatus(*PostPeerStatusRequest, SyncApp_PostAppStatusServer) error
type UnsafeSyncAppServer ¶
type UnsafeSyncAppServer interface {
	// contains filtered or unexported methods
}
    UnsafeSyncAppServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SyncAppServer will result in compilation errors.