proto

package
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SyncApp_PostAppStatus_FullMethodName = "/v1.SyncApp/PostAppStatus"
	SyncApp_GetData_FullMethodName       = "/v1.SyncApp/GetData"
	SyncApp_GetStatus_FullMethodName     = "/v1.SyncApp/GetStatus"
)

Variables

View Source
var File_core_application_proto_syncer_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use AppStatus.ProtoReflect.Descriptor instead.

func (*AppStatus) GetAddr

func (x *AppStatus) GetAddr() string

func (*AppStatus) GetAppOrigin

func (x *AppStatus) GetAppOrigin() string

func (*AppStatus) GetAveragePower

func (x *AppStatus) GetAveragePower() float32

func (*AppStatus) GetCpuInfo

func (x *AppStatus) GetCpuInfo() string

func (*AppStatus) GetGpuInfo

func (x *AppStatus) GetGpuInfo() string

func (*AppStatus) GetGuageHeight

func (x *AppStatus) GetGuageHeight() uint64

func (*AppStatus) GetGuageMax

func (x *AppStatus) GetGuageMax() uint64

func (*AppStatus) GetMac

func (x *AppStatus) GetMac() string

func (*AppStatus) GetMemInfo

func (x *AppStatus) GetMemInfo() string

func (*AppStatus) GetModelHash

func (x *AppStatus) GetModelHash() string

func (*AppStatus) GetName

func (x *AppStatus) GetName() string

func (*AppStatus) GetNodeId

func (x *AppStatus) GetNodeId() string

func (*AppStatus) GetRelay

func (x *AppStatus) GetRelay() string

func (*AppStatus) GetRelayProxyPort

func (x *AppStatus) GetRelayProxyPort() uint64

func (*AppStatus) GetStartupTime

func (x *AppStatus) GetStartupTime() uint64

func (*AppStatus) GetUptime

func (x *AppStatus) GetUptime() uint64

func (*AppStatus) GetVersion

func (x *AppStatus) GetVersion() string

func (*AppStatus) ProtoMessage

func (*AppStatus) ProtoMessage()

func (*AppStatus) ProtoReflect

func (x *AppStatus) ProtoReflect() protoreflect.Message

func (*AppStatus) Reset

func (x *AppStatus) Reset()

func (*AppStatus) String

func (x *AppStatus) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Data.ProtoReflect.Descriptor instead.

func (*Data) GetData

func (x *Data) GetData() map[string][]byte

func (*Data) ProtoMessage

func (*Data) ProtoMessage()

func (*Data) ProtoReflect

func (x *Data) ProtoReflect() protoreflect.Message

func (*Data) Reset

func (x *Data) Reset()

func (*Data) String

func (x *Data) String() string

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) Descriptor() ([]byte, []int)

Deprecated: Use Result.ProtoReflect.Descriptor instead.

func (*Result) GetData

func (x *Result) GetData() string

func (*Result) ProtoMessage

func (*Result) ProtoMessage()

func (*Result) ProtoReflect

func (x *Result) ProtoReflect() protoreflect.Message

func (*Result) Reset

func (x *Result) Reset()

func (*Result) String

func (x *Result) String() string

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) GetStatus

func (UnimplementedSyncAppServer) PostAppStatus

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL