Documentation
¶
Overview ¶
Package sonm is a generated protocol buffer package.
It is generated from these files:
bid.proto capabilities.proto deal.proto hub.proto insonmnia.proto locator.proto marketplace.proto miner.proto node.proto
It has these top-level messages:
Geo Resources Slot Order Capabilities CPUDevice RAMDevice GPUDevice Deal ListReply HubStartTaskRequest HubStartTaskReply HubStatusReply DealRequest GetDevicePropertiesReply SetDevicePropertiesRequest SlotsReply GetAllSlotsReply AddSlotRequest RemoveSlotRequest GetRegisteredWorkersReply TaskListReply CPUDeviceInfo GPUDeviceInfo DevicesReply InsertSlotRequest PullTaskRequest DealInfoReply CompletedTask Empty ID TaskID PingReply CPUUsage MemoryUsage NetworkUsage ResourceUsage InfoReply TaskStatusReply AvailableResources StatusMapReply ContainerRestartPolicy TaskLogsRequest TaskLogsChunk DiscoverHubRequest TaskResourceRequirements Timestamp Chunk Progress AnnounceRequest ResolveRequest ResolveReply GetOrdersRequest GetOrdersReply GetProcessingReply MinerHandshakeRequest MinerHandshakeReply MinerStartRequest SocketAddr MinerStartReply TaskInfo Route MinerStatusMapRequest SaveRequest TaskListRequest DealListRequest DealListReply
Index ¶
- Variables
- func RegisterDealManagementServer(s *grpc.Server, srv DealManagementServer)
- func RegisterHubManagementServer(s *grpc.Server, srv HubManagementServer)
- func RegisterHubServer(s *grpc.Server, srv HubServer)
- func RegisterLocatorServer(s *grpc.Server, srv LocatorServer)
- func RegisterMarketServer(s *grpc.Server, srv MarketServer)
- func RegisterMinerServer(s *grpc.Server, srv MinerServer)
- func RegisterTaskManagementServer(s *grpc.Server, srv TaskManagementServer)
- type AddSlotRequest
- type AnnounceRequest
- type AvailableResources
- func (*AvailableResources) Descriptor() ([]byte, []int)
- func (m *AvailableResources) GetCPUPeriod() int64
- func (m *AvailableResources) GetCPUQuota() int64
- func (m *AvailableResources) GetCPURealtimePeriod() int64
- func (m *AvailableResources) GetCPURealtimeRuntime() int64
- func (m *AvailableResources) GetCgroup() string
- func (m *AvailableResources) GetCgroupParent() string
- func (m *AvailableResources) GetCpusetCpus() string
- func (m *AvailableResources) GetCpusetMems() string
- func (m *AvailableResources) GetDiskQuota() int64
- func (m *AvailableResources) GetKernelMemory() int64
- func (m *AvailableResources) GetMemory() uint64
- func (m *AvailableResources) GetMemoryReservation() int64
- func (m *AvailableResources) GetMemorySwap() int64
- func (m *AvailableResources) GetNumCPUs() int64
- func (m *AvailableResources) GetNumGPUs() int64
- func (m *AvailableResources) GetPidsLimit() int64
- func (*AvailableResources) ProtoMessage()
- func (m *AvailableResources) Reset()
- func (m *AvailableResources) String() string
- type CPUDevice
- func (*CPUDevice) Descriptor() ([]byte, []int)
- func (m *CPUDevice) GetCacheSize() int32
- func (m *CPUDevice) GetClockFrequency() float64
- func (m *CPUDevice) GetCores() int32
- func (m *CPUDevice) GetFlags() []string
- func (m *CPUDevice) GetModel() string
- func (m *CPUDevice) GetModelName() string
- func (m *CPUDevice) GetNum() int32
- func (m *CPUDevice) GetStepping() int32
- func (m *CPUDevice) GetVendorId() string
- func (*CPUDevice) ProtoMessage()
- func (m *CPUDevice) Reset()
- func (m *CPUDevice) String() string
- type CPUDeviceInfo
- type CPUUsage
- type Capabilities
- type Chunk
- type CompletedTask
- type ContainerRestartPolicy
- func (*ContainerRestartPolicy) Descriptor() ([]byte, []int)
- func (m *ContainerRestartPolicy) GetMaximumRetryCount() uint32
- func (m *ContainerRestartPolicy) GetName() string
- func (*ContainerRestartPolicy) ProtoMessage()
- func (m *ContainerRestartPolicy) Reset()
- func (m *ContainerRestartPolicy) String() string
- type Deal
- func (*Deal) Descriptor() ([]byte, []int)
- func (m *Deal) GetBuyerID() string
- func (m *Deal) GetEndTime() *Timestamp
- func (m *Deal) GetId() string
- func (m *Deal) GetPrice() string
- func (m *Deal) GetSpecificationHash() string
- func (m *Deal) GetStartTime() *Timestamp
- func (m *Deal) GetStatus() DealStatus
- func (m *Deal) GetSupplierID() string
- func (m *Deal) GetWorkTime() uint64
- func (*Deal) ProtoMessage()
- func (m *Deal) Reset()
- func (m *Deal) String() string
- type DealInfoReply
- func (*DealInfoReply) Descriptor() ([]byte, []int)
- func (m *DealInfoReply) GetId() *ID
- func (m *DealInfoReply) GetOrder() *Order
- func (m *DealInfoReply) GetTasksCompleted() []*CompletedTask
- func (m *DealInfoReply) GetTasksRunning() []*ID
- func (*DealInfoReply) ProtoMessage()
- func (m *DealInfoReply) Reset()
- func (m *DealInfoReply) String() string
- type DealListReply
- type DealListRequest
- type DealManagementClient
- type DealManagementServer
- type DealRequest
- type DealStatus
- type DevicesReply
- type DiscoverHubRequest
- type Empty
- type GPUCount
- type GPUDevice
- func (*GPUDevice) Descriptor() ([]byte, []int)
- func (m *GPUDevice) GetMaxClockFrequency() uint64
- func (m *GPUDevice) GetMaxMemorySize() uint64
- func (m *GPUDevice) GetName() string
- func (m *GPUDevice) GetOpenCLDeviceVersionMajor() int32
- func (m *GPUDevice) GetOpenCLDeviceVersionMinor() int32
- func (m *GPUDevice) GetVendorId() uint64
- func (m *GPUDevice) GetVendorName() string
- func (*GPUDevice) ProtoMessage()
- func (m *GPUDevice) Reset()
- func (m *GPUDevice) String() string
- type GPUDeviceInfo
- type Geo
- type GetAllSlotsReply
- type GetAllSlotsReply_SlotList
- type GetDevicePropertiesReply
- type GetOrdersReply
- type GetOrdersRequest
- type GetProcessingReply
- type GetProcessingReply_ProcessedOrder
- func (*GetProcessingReply_ProcessedOrder) Descriptor() ([]byte, []int)
- func (m *GetProcessingReply_ProcessedOrder) GetExtra() string
- func (m *GetProcessingReply_ProcessedOrder) GetId() string
- func (m *GetProcessingReply_ProcessedOrder) GetStatus() uint32
- func (m *GetProcessingReply_ProcessedOrder) GetTimestamp() *Timestamp
- func (*GetProcessingReply_ProcessedOrder) ProtoMessage()
- func (m *GetProcessingReply_ProcessedOrder) Reset()
- func (m *GetProcessingReply_ProcessedOrder) String() string
- type GetRegisteredWorkersReply
- type HubClient
- type HubManagementClient
- type HubManagementServer
- type HubServer
- type HubStartTaskReply
- func (*HubStartTaskReply) Descriptor() ([]byte, []int)
- func (m *HubStartTaskReply) GetEndpoint() []string
- func (m *HubStartTaskReply) GetHubAddr() string
- func (m *HubStartTaskReply) GetId() string
- func (*HubStartTaskReply) ProtoMessage()
- func (m *HubStartTaskReply) Reset()
- func (m *HubStartTaskReply) String() string
- type HubStartTaskRequest
- func (*HubStartTaskRequest) Descriptor() ([]byte, []int)
- func (m *HubStartTaskRequest) GetAuth() string
- func (m *HubStartTaskRequest) GetCommitOnStop() bool
- func (m *HubStartTaskRequest) GetDeal() *Deal
- func (m *HubStartTaskRequest) GetEnv() map[string]string
- func (m *HubStartTaskRequest) GetImage() string
- func (m *HubStartTaskRequest) GetPublicKeyData() string
- func (m *HubStartTaskRequest) GetRegistry() string
- func (*HubStartTaskRequest) ProtoMessage()
- func (m *HubStartTaskRequest) Reset()
- func (m *HubStartTaskRequest) String() string
- type HubStatusReply
- func (*HubStatusReply) Descriptor() ([]byte, []int)
- func (m *HubStatusReply) GetEthAddr() string
- func (m *HubStatusReply) GetMinerCount() uint64
- func (m *HubStatusReply) GetPlatform() string
- func (m *HubStatusReply) GetUptime() uint64
- func (m *HubStatusReply) GetVersion() string
- func (*HubStatusReply) ProtoMessage()
- func (m *HubStatusReply) Reset()
- func (m *HubStatusReply) String() string
- type Hub_PullTaskClient
- type Hub_PullTaskServer
- type Hub_PushTaskClient
- type Hub_PushTaskServer
- type Hub_TaskLogsClient
- type Hub_TaskLogsServer
- type ID
- type InfoReply
- type InsertSlotRequest
- func (*InsertSlotRequest) Descriptor() ([]byte, []int)
- func (m *InsertSlotRequest) GetBuyerID() string
- func (m *InsertSlotRequest) GetPrice() string
- func (m *InsertSlotRequest) GetSlot() *Slot
- func (*InsertSlotRequest) ProtoMessage()
- func (m *InsertSlotRequest) Reset()
- func (m *InsertSlotRequest) String() string
- type ListReply
- type ListReply_ListValue
- type LocatorClient
- type LocatorServer
- type MarketClient
- type MarketServer
- type MemoryUsage
- type MinerClient
- type MinerHandshakeReply
- func (*MinerHandshakeReply) Descriptor() ([]byte, []int)
- func (m *MinerHandshakeReply) GetCapabilities() *Capabilities
- func (m *MinerHandshakeReply) GetMiner() string
- func (m *MinerHandshakeReply) GetNatType() NATType
- func (*MinerHandshakeReply) ProtoMessage()
- func (m *MinerHandshakeReply) Reset()
- func (m *MinerHandshakeReply) String() string
- type MinerHandshakeRequest
- type MinerServer
- type MinerStartReply
- type MinerStartRequest
- func (*MinerStartRequest) Descriptor() ([]byte, []int)
- func (m *MinerStartRequest) GetAuth() string
- func (m *MinerStartRequest) GetCommitOnStop() bool
- func (m *MinerStartRequest) GetEnv() map[string]string
- func (m *MinerStartRequest) GetId() string
- func (m *MinerStartRequest) GetImage() string
- func (m *MinerStartRequest) GetOrderId() string
- func (m *MinerStartRequest) GetPublicKeyData() string
- func (m *MinerStartRequest) GetRegistry() string
- func (m *MinerStartRequest) GetResources() *TaskResourceRequirements
- func (m *MinerStartRequest) GetRestartPolicy() *ContainerRestartPolicy
- func (*MinerStartRequest) ProtoMessage()
- func (m *MinerStartRequest) Reset()
- func (m *MinerStartRequest) String() string
- type MinerStatusMapRequest
- type Miner_LoadClient
- type Miner_LoadServer
- type Miner_SaveClient
- type Miner_SaveServer
- type Miner_TaskLogsClient
- type Miner_TaskLogsServer
- type Miner_TasksStatusClient
- type Miner_TasksStatusServer
- type NATType
- type NetworkType
- type NetworkUsage
- func (*NetworkUsage) Descriptor() ([]byte, []int)
- func (m *NetworkUsage) GetRxBytes() uint64
- func (m *NetworkUsage) GetRxDropped() uint64
- func (m *NetworkUsage) GetRxErrors() uint64
- func (m *NetworkUsage) GetRxPackets() uint64
- func (m *NetworkUsage) GetTxBytes() uint64
- func (m *NetworkUsage) GetTxDropped() uint64
- func (m *NetworkUsage) GetTxErrors() uint64
- func (m *NetworkUsage) GetTxPackets() uint64
- func (*NetworkUsage) ProtoMessage()
- func (m *NetworkUsage) Reset()
- func (m *NetworkUsage) String() string
- type Order
- func (*Order) Descriptor() ([]byte, []int)
- func (m *Order) GetByuerID() string
- func (m *Order) GetId() string
- func (m *Order) GetOrderType() OrderType
- func (m *Order) GetPrice() string
- func (m *Order) GetSlot() *Slot
- func (m *Order) GetSupplierID() string
- func (*Order) ProtoMessage()
- func (m *Order) Reset()
- func (m *Order) String() string
- type OrderType
- type PingReply
- type Progress
- type PullTaskRequest
- type RAMDevice
- type RemoveSlotRequest
- type ResolveReply
- type ResolveRequest
- type ResourceUsage
- func (*ResourceUsage) Descriptor() ([]byte, []int)
- func (m *ResourceUsage) GetCpu() *CPUUsage
- func (m *ResourceUsage) GetMemory() *MemoryUsage
- func (m *ResourceUsage) GetNetwork() map[string]*NetworkUsage
- func (*ResourceUsage) ProtoMessage()
- func (m *ResourceUsage) Reset()
- func (m *ResourceUsage) String() string
- type Resources
- func (*Resources) Descriptor() ([]byte, []int)
- func (m *Resources) GetCpuCores() uint64
- func (m *Resources) GetGpuCount() GPUCount
- func (m *Resources) GetNetTrafficIn() uint64
- func (m *Resources) GetNetTrafficOut() uint64
- func (m *Resources) GetNetworkType() NetworkType
- func (m *Resources) GetProperties() map[string]float64
- func (m *Resources) GetRamBytes() uint64
- func (m *Resources) GetStorage() uint64
- func (*Resources) ProtoMessage()
- func (m *Resources) Reset()
- func (m *Resources) String() string
- type Route
- type SaveRequest
- type SetDevicePropertiesRequest
- func (*SetDevicePropertiesRequest) Descriptor() ([]byte, []int)
- func (m *SetDevicePropertiesRequest) GetID() string
- func (m *SetDevicePropertiesRequest) GetProperties() map[string]float64
- func (*SetDevicePropertiesRequest) ProtoMessage()
- func (m *SetDevicePropertiesRequest) Reset()
- func (m *SetDevicePropertiesRequest) String() string
- type Slot
- func (*Slot) Descriptor() ([]byte, []int)
- func (m *Slot) GetBuyerRating() int64
- func (m *Slot) GetDuration() uint64
- func (m *Slot) GetGeo() *Geo
- func (m *Slot) GetResources() *Resources
- func (m *Slot) GetSupplierRating() int64
- func (*Slot) ProtoMessage()
- func (m *Slot) Reset()
- func (m *Slot) String() string
- type SlotsReply
- type SocketAddr
- type StatusMapReply
- type TaskID
- type TaskInfo
- type TaskListReply
- type TaskListReply_TaskInfo
- type TaskListRequest
- type TaskLogsChunk
- type TaskLogsRequest
- func (*TaskLogsRequest) Descriptor() ([]byte, []int)
- func (m *TaskLogsRequest) GetAddTimestamps() bool
- func (m *TaskLogsRequest) GetDetails() bool
- func (m *TaskLogsRequest) GetFollow() bool
- func (m *TaskLogsRequest) GetHubAddr() string
- func (m *TaskLogsRequest) GetId() string
- func (m *TaskLogsRequest) GetSince() string
- func (m *TaskLogsRequest) GetTail() string
- func (m *TaskLogsRequest) GetType() TaskLogsRequest_Type
- func (*TaskLogsRequest) ProtoMessage()
- func (m *TaskLogsRequest) Reset()
- func (m *TaskLogsRequest) String() string
- type TaskLogsRequest_Type
- type TaskManagementClient
- type TaskManagementServer
- type TaskManagement_LogsClient
- type TaskManagement_LogsServer
- type TaskManagement_PullTaskClient
- type TaskManagement_PullTaskServer
- type TaskManagement_PushTaskClient
- type TaskManagement_PushTaskServer
- type TaskResourceRequirements
- func (*TaskResourceRequirements) Descriptor() ([]byte, []int)
- func (m *TaskResourceRequirements) GetCPUCores() uint64
- func (m *TaskResourceRequirements) GetGPUSupport() GPUCount
- func (m *TaskResourceRequirements) GetMaxMemory() int64
- func (*TaskResourceRequirements) ProtoMessage()
- func (m *TaskResourceRequirements) Reset()
- func (m *TaskResourceRequirements) String() string
- type TaskStatusReply
- func (*TaskStatusReply) Descriptor() ([]byte, []int)
- func (m *TaskStatusReply) GetAvailableResources() *AvailableResources
- func (m *TaskStatusReply) GetImageName() string
- func (m *TaskStatusReply) GetMinerID() string
- func (m *TaskStatusReply) GetPorts() string
- func (m *TaskStatusReply) GetStatus() TaskStatusReply_Status
- func (m *TaskStatusReply) GetUptime() uint64
- func (m *TaskStatusReply) GetUsage() *ResourceUsage
- func (*TaskStatusReply) ProtoMessage()
- func (m *TaskStatusReply) Reset()
- func (m *TaskStatusReply) String() string
- type TaskStatusReply_Status
- type Timestamp
Constants ¶
This section is empty.
Variables ¶
View Source
var DealStatus_name = map[int32]string{
0: "ANY_STATUS",
1: "PENDING",
2: "ACCEPTED",
3: "CLOSED",
}
View Source
var DealStatus_value = map[string]int32{
"ANY_STATUS": 0,
"PENDING": 1,
"ACCEPTED": 2,
"CLOSED": 3,
}
View Source
var GPUCount_name = map[int32]string{
0: "NO_GPU",
1: "SINGLE_GPU",
2: "MULTIPLE_GPU",
}
View Source
var GPUCount_value = map[string]int32{
"NO_GPU": 0,
"SINGLE_GPU": 1,
"MULTIPLE_GPU": 2,
}
View Source
var NATType_name = map[int32]string{
0: "NONE",
1: "BLOCKED",
2: "FULL",
3: "SYMMETRIC",
4: "RESTRICTED",
5: "PORT_RESTRICTED",
6: "SYMMETRIC_UDP_FIREWALL",
7: "UNKNOWN",
}
View Source
var NATType_value = map[string]int32{
"NONE": 0,
"BLOCKED": 1,
"FULL": 2,
"SYMMETRIC": 3,
"RESTRICTED": 4,
"PORT_RESTRICTED": 5,
"SYMMETRIC_UDP_FIREWALL": 6,
"UNKNOWN": 7,
}
View Source
var NetworkType_name = map[int32]string{
0: "NO_NETWORK",
1: "OUTBOUND",
2: "INCOMING",
}
View Source
var NetworkType_value = map[string]int32{
"NO_NETWORK": 0,
"OUTBOUND": 1,
"INCOMING": 2,
}
View Source
var OrderType_name = map[int32]string{
0: "ANY",
1: "BID",
2: "ASK",
}
View Source
var OrderType_value = map[string]int32{
"ANY": 0,
"BID": 1,
"ASK": 2,
}
View Source
var TaskLogsRequest_Type_name = map[int32]string{
0: "STDOUT",
1: "STDERR",
2: "BOTH",
}
View Source
var TaskLogsRequest_Type_value = map[string]int32{
"STDOUT": 0,
"STDERR": 1,
"BOTH": 2,
}
View Source
var TaskStatusReply_Status_name = map[int32]string{
0: "UNKNOWN",
1: "SPOOLING",
2: "SPAWNING",
3: "RUNNING",
4: "FINISHED",
5: "BROKEN",
}
View Source
var TaskStatusReply_Status_value = map[string]int32{
"UNKNOWN": 0,
"SPOOLING": 1,
"SPAWNING": 2,
"RUNNING": 3,
"FINISHED": 4,
"BROKEN": 5,
}
Functions ¶
func RegisterDealManagementServer ¶
func RegisterDealManagementServer(s *grpc.Server, srv DealManagementServer)
func RegisterHubManagementServer ¶
func RegisterHubManagementServer(s *grpc.Server, srv HubManagementServer)
func RegisterHubServer ¶
func RegisterLocatorServer ¶
func RegisterLocatorServer(s *grpc.Server, srv LocatorServer)
func RegisterMarketServer ¶
func RegisterMarketServer(s *grpc.Server, srv MarketServer)
func RegisterMinerServer ¶
func RegisterMinerServer(s *grpc.Server, srv MinerServer)
func RegisterTaskManagementServer ¶
func RegisterTaskManagementServer(s *grpc.Server, srv TaskManagementServer)
Types ¶
type AddSlotRequest ¶
type AddSlotRequest struct {
// Miner ID.
ID string `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"`
// Slot destription.
Slot *Slot `protobuf:"bytes,2,opt,name=slot" json:"slot,omitempty"`
}
func (*AddSlotRequest) Descriptor ¶
func (*AddSlotRequest) Descriptor() ([]byte, []int)
func (*AddSlotRequest) GetID ¶
func (m *AddSlotRequest) GetID() string
func (*AddSlotRequest) GetSlot ¶
func (m *AddSlotRequest) GetSlot() *Slot
func (*AddSlotRequest) ProtoMessage ¶
func (*AddSlotRequest) ProtoMessage()
func (*AddSlotRequest) Reset ¶
func (m *AddSlotRequest) Reset()
func (*AddSlotRequest) String ¶
func (m *AddSlotRequest) String() string
type AnnounceRequest ¶
type AnnounceRequest struct {
// todo: remove repeated
IpAddr []string `protobuf:"bytes,2,rep,name=ipAddr" json:"ipAddr,omitempty"`
}
func (*AnnounceRequest) Descriptor ¶
func (*AnnounceRequest) Descriptor() ([]byte, []int)
func (*AnnounceRequest) GetIpAddr ¶
func (m *AnnounceRequest) GetIpAddr() []string
func (*AnnounceRequest) ProtoMessage ¶
func (*AnnounceRequest) ProtoMessage()
func (*AnnounceRequest) Reset ¶
func (m *AnnounceRequest) Reset()
func (*AnnounceRequest) String ¶
func (m *AnnounceRequest) String() string
type AvailableResources ¶
type AvailableResources struct {
NumCPUs int64 `protobuf:"varint,1,opt,name=numCPUs" json:"numCPUs,omitempty"`
NumGPUs int64 `protobuf:"varint,2,opt,name=numGPUs" json:"numGPUs,omitempty"`
Memory uint64 `protobuf:"varint,3,opt,name=memory" json:"memory,omitempty"`
CPUPeriod int64 `protobuf:"varint,4,opt,name=CPUPeriod" json:"CPUPeriod,omitempty"`
CPUQuota int64 `protobuf:"varint,5,opt,name=CPUQuota" json:"CPUQuota,omitempty"`
CPURealtimePeriod int64 `protobuf:"varint,6,opt,name=CPURealtimePeriod" json:"CPURealtimePeriod,omitempty"`
CPURealtimeRuntime int64 `protobuf:"varint,7,opt,name=CPURealtimeRuntime" json:"CPURealtimeRuntime,omitempty"`
CpusetCpus string `protobuf:"bytes,8,opt,name=CpusetCpus" json:"CpusetCpus,omitempty"`
CpusetMems string `protobuf:"bytes,9,opt,name=CpusetMems" json:"CpusetMems,omitempty"`
DiskQuota int64 `protobuf:"varint,10,opt,name=DiskQuota" json:"DiskQuota,omitempty"`
KernelMemory int64 `protobuf:"varint,11,opt,name=KernelMemory" json:"KernelMemory,omitempty"`
MemoryReservation int64 `protobuf:"varint,12,opt,name=MemoryReservation" json:"MemoryReservation,omitempty"`
MemorySwap int64 `protobuf:"varint,13,opt,name=MemorySwap" json:"MemorySwap,omitempty"`
PidsLimit int64 `protobuf:"varint,14,opt,name=PidsLimit" json:"PidsLimit,omitempty"`
Cgroup string `protobuf:"bytes,15,opt,name=cgroup" json:"cgroup,omitempty"`
CgroupParent string `protobuf:"bytes,16,opt,name=cgroupParent" json:"cgroupParent,omitempty"`
}
func (*AvailableResources) Descriptor ¶
func (*AvailableResources) Descriptor() ([]byte, []int)
func (*AvailableResources) GetCPUPeriod ¶
func (m *AvailableResources) GetCPUPeriod() int64
func (*AvailableResources) GetCPUQuota ¶
func (m *AvailableResources) GetCPUQuota() int64
func (*AvailableResources) GetCPURealtimePeriod ¶
func (m *AvailableResources) GetCPURealtimePeriod() int64
func (*AvailableResources) GetCPURealtimeRuntime ¶
func (m *AvailableResources) GetCPURealtimeRuntime() int64
func (*AvailableResources) GetCgroup ¶
func (m *AvailableResources) GetCgroup() string
func (*AvailableResources) GetCgroupParent ¶
func (m *AvailableResources) GetCgroupParent() string
func (*AvailableResources) GetCpusetCpus ¶
func (m *AvailableResources) GetCpusetCpus() string
func (*AvailableResources) GetCpusetMems ¶
func (m *AvailableResources) GetCpusetMems() string
func (*AvailableResources) GetDiskQuota ¶
func (m *AvailableResources) GetDiskQuota() int64
func (*AvailableResources) GetKernelMemory ¶
func (m *AvailableResources) GetKernelMemory() int64
func (*AvailableResources) GetMemory ¶
func (m *AvailableResources) GetMemory() uint64
func (*AvailableResources) GetMemoryReservation ¶
func (m *AvailableResources) GetMemoryReservation() int64
func (*AvailableResources) GetMemorySwap ¶
func (m *AvailableResources) GetMemorySwap() int64
func (*AvailableResources) GetNumCPUs ¶
func (m *AvailableResources) GetNumCPUs() int64
func (*AvailableResources) GetNumGPUs ¶
func (m *AvailableResources) GetNumGPUs() int64
func (*AvailableResources) GetPidsLimit ¶
func (m *AvailableResources) GetPidsLimit() int64
func (*AvailableResources) ProtoMessage ¶
func (*AvailableResources) ProtoMessage()
func (*AvailableResources) Reset ¶
func (m *AvailableResources) Reset()
func (*AvailableResources) String ¶
func (m *AvailableResources) String() string
type CPUDevice ¶
type CPUDevice struct {
// Num describes the CPU number on a board.
Num int32 `protobuf:"varint,1,opt,name=num" json:"num,omitempty"`
// VendorId describes vendor id as a string, for example "GenuineIntel".
VendorId string `protobuf:"bytes,2,opt,name=vendorId" json:"vendorId,omitempty"`
// Model describes model.
Model string `protobuf:"bytes,3,opt,name=model" json:"model,omitempty"`
// ModelName describes full model name.
// For example "Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz".
ModelName string `protobuf:"bytes,4,opt,name=modelName" json:"modelName,omitempty"`
// Cores describes number of cores on a CPU device.
Cores int32 `protobuf:"varint,5,opt,name=cores" json:"cores,omitempty"`
// Maximum configured clock frequency of the device in MHz.
ClockFrequency float64 `protobuf:"fixed64,6,opt,name=clockFrequency" json:"clockFrequency,omitempty"`
// CacheSize shows CPU cache size.
CacheSize int32 `protobuf:"varint,7,opt,name=cacheSize" json:"cacheSize,omitempty"`
// Stepping describes CPU stepping level.
Stepping int32 `protobuf:"varint,8,opt,name=stepping" json:"stepping,omitempty"`
// Flags describes supported extensions on a CPU.
Flags []string `protobuf:"bytes,9,rep,name=flags" json:"flags,omitempty"`
}
func (*CPUDevice) Descriptor ¶
func (*CPUDevice) GetCacheSize ¶
func (*CPUDevice) GetClockFrequency ¶
func (*CPUDevice) GetModelName ¶
func (*CPUDevice) GetStepping ¶
func (*CPUDevice) GetVendorId ¶
func (*CPUDevice) ProtoMessage ¶
func (*CPUDevice) ProtoMessage()
type CPUDeviceInfo ¶
type CPUDeviceInfo struct {
// Miners where such device exists.
Miners []string `protobuf:"bytes,1,rep,name=miners" json:"miners,omitempty"`
// Its properties.
Device *CPUDevice `protobuf:"bytes,2,opt,name=device" json:"device,omitempty"`
}
func (*CPUDeviceInfo) Descriptor ¶
func (*CPUDeviceInfo) Descriptor() ([]byte, []int)
func (*CPUDeviceInfo) GetDevice ¶
func (m *CPUDeviceInfo) GetDevice() *CPUDevice
func (*CPUDeviceInfo) GetMiners ¶
func (m *CPUDeviceInfo) GetMiners() []string
func (*CPUDeviceInfo) ProtoMessage ¶
func (*CPUDeviceInfo) ProtoMessage()
func (*CPUDeviceInfo) Reset ¶
func (m *CPUDeviceInfo) Reset()
func (*CPUDeviceInfo) String ¶
func (m *CPUDeviceInfo) String() string
type CPUUsage ¶
type CPUUsage struct {
Total uint64 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"`
}
func (*CPUUsage) Descriptor ¶
func (*CPUUsage) ProtoMessage ¶
func (*CPUUsage) ProtoMessage()
type Capabilities ¶
type Capabilities struct {
Cpu []*CPUDevice `protobuf:"bytes,1,rep,name=cpu" json:"cpu,omitempty"`
Mem *RAMDevice `protobuf:"bytes,2,opt,name=mem" json:"mem,omitempty"`
Gpu []*GPUDevice `protobuf:"bytes,3,rep,name=gpu" json:"gpu,omitempty"`
}
func (*Capabilities) Descriptor ¶
func (*Capabilities) Descriptor() ([]byte, []int)
func (*Capabilities) GetCpu ¶
func (m *Capabilities) GetCpu() []*CPUDevice
func (*Capabilities) GetGpu ¶
func (m *Capabilities) GetGpu() []*GPUDevice
func (*Capabilities) GetMem ¶
func (m *Capabilities) GetMem() *RAMDevice
func (*Capabilities) ProtoMessage ¶
func (*Capabilities) ProtoMessage()
func (*Capabilities) Reset ¶
func (m *Capabilities) Reset()
func (*Capabilities) String ¶
func (m *Capabilities) String() string
type Chunk ¶
type Chunk struct {
Chunk []byte `protobuf:"bytes,1,opt,name=chunk,proto3" json:"chunk,omitempty"`
}
func (*Chunk) Descriptor ¶
func (*Chunk) ProtoMessage ¶
func (*Chunk) ProtoMessage()
type CompletedTask ¶
type CompletedTask struct {
Id *ID `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
Image string `protobuf:"bytes,2,opt,name=image" json:"image,omitempty"`
EndTime *Timestamp `protobuf:"bytes,3,opt,name=endTime" json:"endTime,omitempty"`
}
func (*CompletedTask) Descriptor ¶
func (*CompletedTask) Descriptor() ([]byte, []int)
func (*CompletedTask) GetEndTime ¶
func (m *CompletedTask) GetEndTime() *Timestamp
func (*CompletedTask) GetId ¶
func (m *CompletedTask) GetId() *ID
func (*CompletedTask) GetImage ¶
func (m *CompletedTask) GetImage() string
func (*CompletedTask) ProtoMessage ¶
func (*CompletedTask) ProtoMessage()
func (*CompletedTask) Reset ¶
func (m *CompletedTask) Reset()
func (*CompletedTask) String ¶
func (m *CompletedTask) String() string
type ContainerRestartPolicy ¶
type ContainerRestartPolicy struct {
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
MaximumRetryCount uint32 `protobuf:"varint,2,opt,name=maximumRetryCount" json:"maximumRetryCount,omitempty"`
}
func (*ContainerRestartPolicy) Descriptor ¶
func (*ContainerRestartPolicy) Descriptor() ([]byte, []int)
func (*ContainerRestartPolicy) GetMaximumRetryCount ¶
func (m *ContainerRestartPolicy) GetMaximumRetryCount() uint32
func (*ContainerRestartPolicy) GetName ¶
func (m *ContainerRestartPolicy) GetName() string
func (*ContainerRestartPolicy) ProtoMessage ¶
func (*ContainerRestartPolicy) ProtoMessage()
func (*ContainerRestartPolicy) Reset ¶
func (m *ContainerRestartPolicy) Reset()
func (*ContainerRestartPolicy) String ¶
func (m *ContainerRestartPolicy) String() string
type Deal ¶
type Deal struct {
BuyerID string `protobuf:"bytes,1,opt,name=BuyerID" json:"BuyerID,omitempty"`
SupplierID string `protobuf:"bytes,2,opt,name=SupplierID" json:"SupplierID,omitempty"`
Status DealStatus `protobuf:"varint,3,opt,name=status,enum=sonm.DealStatus" json:"status,omitempty"`
Price string `protobuf:"bytes,4,opt,name=price" json:"price,omitempty"`
StartTime *Timestamp `protobuf:"bytes,5,opt,name=startTime" json:"startTime,omitempty"`
EndTime *Timestamp `protobuf:"bytes,6,opt,name=endTime" json:"endTime,omitempty"`
SpecificationHash string `protobuf:"bytes,7,opt,name=SpecificationHash" json:"SpecificationHash,omitempty"`
WorkTime uint64 `protobuf:"varint,8,opt,name=workTime" json:"workTime,omitempty"`
Id string `protobuf:"bytes,9,opt,name=id" json:"id,omitempty"`
}
func (*Deal) Descriptor ¶
func (*Deal) GetBuyerID ¶
func (*Deal) GetEndTime ¶
func (*Deal) GetSpecificationHash ¶
func (*Deal) GetStartTime ¶
func (*Deal) GetStatus ¶
func (m *Deal) GetStatus() DealStatus
func (*Deal) GetSupplierID ¶
func (*Deal) GetWorkTime ¶
func (*Deal) ProtoMessage ¶
func (*Deal) ProtoMessage()
type DealInfoReply ¶
type DealInfoReply struct {
Id *ID `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
Order *Order `protobuf:"bytes,2,opt,name=order" json:"order,omitempty"`
// List of currently running task IDs. More detailed info can be obtained
// using "TaskStatus" method.
TasksRunning []*ID `protobuf:"bytes,3,rep,name=tasksRunning" json:"tasksRunning,omitempty"`
// List of completed tasks.
TasksCompleted []*CompletedTask `protobuf:"bytes,4,rep,name=tasksCompleted" json:"tasksCompleted,omitempty"`
}
Note: no secure info should be here.
func (*DealInfoReply) Descriptor ¶
func (*DealInfoReply) Descriptor() ([]byte, []int)
func (*DealInfoReply) GetId ¶
func (m *DealInfoReply) GetId() *ID
func (*DealInfoReply) GetOrder ¶
func (m *DealInfoReply) GetOrder() *Order
func (*DealInfoReply) GetTasksCompleted ¶
func (m *DealInfoReply) GetTasksCompleted() []*CompletedTask
func (*DealInfoReply) GetTasksRunning ¶
func (m *DealInfoReply) GetTasksRunning() []*ID
func (*DealInfoReply) ProtoMessage ¶
func (*DealInfoReply) ProtoMessage()
func (*DealInfoReply) Reset ¶
func (m *DealInfoReply) Reset()
func (*DealInfoReply) String ¶
func (m *DealInfoReply) String() string
type DealListReply ¶
type DealListReply struct {
Deal []*Deal `protobuf:"bytes,1,rep,name=deal" json:"deal,omitempty"`
}
func (*DealListReply) Descriptor ¶
func (*DealListReply) Descriptor() ([]byte, []int)
func (*DealListReply) GetDeal ¶
func (m *DealListReply) GetDeal() []*Deal
func (*DealListReply) ProtoMessage ¶
func (*DealListReply) ProtoMessage()
func (*DealListReply) Reset ¶
func (m *DealListReply) Reset()
func (*DealListReply) String ¶
func (m *DealListReply) String() string
type DealListRequest ¶
type DealListRequest struct {
Owner string `protobuf:"bytes,1,opt,name=owner" json:"owner,omitempty"`
Status DealStatus `protobuf:"varint,2,opt,name=status,enum=sonm.DealStatus" json:"status,omitempty"`
}
func (*DealListRequest) Descriptor ¶
func (*DealListRequest) Descriptor() ([]byte, []int)
func (*DealListRequest) GetOwner ¶
func (m *DealListRequest) GetOwner() string
func (*DealListRequest) GetStatus ¶
func (m *DealListRequest) GetStatus() DealStatus
func (*DealListRequest) ProtoMessage ¶
func (*DealListRequest) ProtoMessage()
func (*DealListRequest) Reset ¶
func (m *DealListRequest) Reset()
func (*DealListRequest) String ¶
func (m *DealListRequest) String() string
type DealManagementClient ¶
type DealManagementClient interface {
// List produces a list of all deals made by client with given ID
List(ctx context.Context, in *DealListRequest, opts ...grpc.CallOption) (*DealListReply, error)
// Status produces a detailed info about deal with given ID
Status(ctx context.Context, in *ID, opts ...grpc.CallOption) (*Deal, error)
// Finish finishes a deal with given ID
Finish(ctx context.Context, in *ID, opts ...grpc.CallOption) (*Empty, error)
}
func NewDealManagementClient ¶
func NewDealManagementClient(cc *grpc.ClientConn) DealManagementClient
type DealManagementServer ¶
type DealManagementServer interface {
// List produces a list of all deals made by client with given ID
List(context.Context, *DealListRequest) (*DealListReply, error)
// Status produces a detailed info about deal with given ID
Status(context.Context, *ID) (*Deal, error)
// Finish finishes a deal with given ID
Finish(context.Context, *ID) (*Empty, error)
}
type DealRequest ¶
type DealRequest struct {
BidId string `protobuf:"bytes,1,opt,name=bidId" json:"bidId,omitempty"`
AskId string `protobuf:"bytes,2,opt,name=askId" json:"askId,omitempty"`
SpecHash string `protobuf:"bytes,4,opt,name=specHash" json:"specHash,omitempty"`
}
func (*DealRequest) Descriptor ¶
func (*DealRequest) Descriptor() ([]byte, []int)
func (*DealRequest) GetAskId ¶
func (m *DealRequest) GetAskId() string
func (*DealRequest) GetBidId ¶
func (m *DealRequest) GetBidId() string
func (*DealRequest) GetSpecHash ¶
func (m *DealRequest) GetSpecHash() string
func (*DealRequest) ProtoMessage ¶
func (*DealRequest) ProtoMessage()
func (*DealRequest) Reset ¶
func (m *DealRequest) Reset()
func (*DealRequest) String ¶
func (m *DealRequest) String() string
type DealStatus ¶
type DealStatus int32
const ( DealStatus_ANY_STATUS DealStatus = 0 DealStatus_PENDING DealStatus = 1 DealStatus_ACCEPTED DealStatus = 2 DealStatus_CLOSED DealStatus = 3 )
func (DealStatus) EnumDescriptor ¶
func (DealStatus) EnumDescriptor() ([]byte, []int)
func (DealStatus) String ¶
func (x DealStatus) String() string
type DevicesReply ¶
type DevicesReply struct {
// CPU unique ID -> Info.
CPUs map[string]*CPUDeviceInfo `` /* 128-byte string literal not displayed */
// GPU unique ID -> Info.
GPUs map[string]*GPUDeviceInfo `` /* 128-byte string literal not displayed */
}
func (*DevicesReply) Descriptor ¶
func (*DevicesReply) Descriptor() ([]byte, []int)
func (*DevicesReply) GetCPUs ¶
func (m *DevicesReply) GetCPUs() map[string]*CPUDeviceInfo
func (*DevicesReply) GetGPUs ¶
func (m *DevicesReply) GetGPUs() map[string]*GPUDeviceInfo
func (*DevicesReply) ProtoMessage ¶
func (*DevicesReply) ProtoMessage()
func (*DevicesReply) Reset ¶
func (m *DevicesReply) Reset()
func (*DevicesReply) String ¶
func (m *DevicesReply) String() string
type DiscoverHubRequest ¶
type DiscoverHubRequest struct {
Endpoint string `protobuf:"bytes,1,opt,name=endpoint" json:"endpoint,omitempty"`
}
func (*DiscoverHubRequest) Descriptor ¶
func (*DiscoverHubRequest) Descriptor() ([]byte, []int)
func (*DiscoverHubRequest) GetEndpoint ¶
func (m *DiscoverHubRequest) GetEndpoint() string
func (*DiscoverHubRequest) ProtoMessage ¶
func (*DiscoverHubRequest) ProtoMessage()
func (*DiscoverHubRequest) Reset ¶
func (m *DiscoverHubRequest) Reset()
func (*DiscoverHubRequest) String ¶
func (m *DiscoverHubRequest) String() string
type Empty ¶
type Empty struct {
}
func (*Empty) Descriptor ¶
func (*Empty) ProtoMessage ¶
func (*Empty) ProtoMessage()
type GPUDevice ¶
type GPUDevice struct {
// Name describes full GPU device name.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// VendorId describes vendor id.
VendorId uint64 `protobuf:"varint,2,opt,name=vendorId" json:"vendorId,omitempty"`
// VendorName describes vendor name, for example "NVIDIA" or "AMD".
VendorName string `protobuf:"bytes,3,opt,name=vendorName" json:"vendorName,omitempty"`
// Total maximum memory size the device can hold.
MaxMemorySize uint64 `protobuf:"varint,4,opt,name=maxMemorySize" json:"maxMemorySize,omitempty"`
// Maximum configured clock frequency of the device in MHz.
MaxClockFrequency uint64 `protobuf:"varint,5,opt,name=maxClockFrequency" json:"maxClockFrequency,omitempty"`
// OpenCL major version.
OpenCLDeviceVersionMajor int32 `protobuf:"varint,6,opt,name=openCLDeviceVersionMajor" json:"openCLDeviceVersionMajor,omitempty"`
// OpenCL minor version.
OpenCLDeviceVersionMinor int32 `protobuf:"varint,7,opt,name=openCLDeviceVersionMinor" json:"openCLDeviceVersionMinor,omitempty"`
}
func (*GPUDevice) Descriptor ¶
func (*GPUDevice) GetMaxClockFrequency ¶
func (*GPUDevice) GetMaxMemorySize ¶
func (*GPUDevice) GetOpenCLDeviceVersionMajor ¶
func (*GPUDevice) GetOpenCLDeviceVersionMinor ¶
func (*GPUDevice) GetVendorId ¶
func (*GPUDevice) GetVendorName ¶
func (*GPUDevice) ProtoMessage ¶
func (*GPUDevice) ProtoMessage()
type GPUDeviceInfo ¶
type GPUDeviceInfo struct {
// Miners where such device exists.
Miners []string `protobuf:"bytes,1,rep,name=miners" json:"miners,omitempty"`
// Its properties.
Device *GPUDevice `protobuf:"bytes,2,opt,name=device" json:"device,omitempty"`
}
func (*GPUDeviceInfo) Descriptor ¶
func (*GPUDeviceInfo) Descriptor() ([]byte, []int)
func (*GPUDeviceInfo) GetDevice ¶
func (m *GPUDeviceInfo) GetDevice() *GPUDevice
func (*GPUDeviceInfo) GetMiners ¶
func (m *GPUDeviceInfo) GetMiners() []string
func (*GPUDeviceInfo) ProtoMessage ¶
func (*GPUDeviceInfo) ProtoMessage()
func (*GPUDeviceInfo) Reset ¶
func (m *GPUDeviceInfo) Reset()
func (*GPUDeviceInfo) String ¶
func (m *GPUDeviceInfo) String() string
type Geo ¶
type Geo struct {
Country string `protobuf:"bytes,1,opt,name=country" json:"country,omitempty"`
City string `protobuf:"bytes,2,opt,name=city" json:"city,omitempty"`
Lat float32 `protobuf:"fixed32,3,opt,name=lat" json:"lat,omitempty"`
Lon float32 `protobuf:"fixed32,4,opt,name=lon" json:"lon,omitempty"`
}
Geo represent GeoIP results for node
func (*Geo) Descriptor ¶
func (*Geo) GetCountry ¶
func (*Geo) ProtoMessage ¶
func (*Geo) ProtoMessage()
type GetAllSlotsReply ¶
type GetAllSlotsReply struct {
Slots map[string]*GetAllSlotsReply_SlotList `` /* 130-byte string literal not displayed */
}
func (*GetAllSlotsReply) Descriptor ¶
func (*GetAllSlotsReply) Descriptor() ([]byte, []int)
func (*GetAllSlotsReply) GetSlots ¶
func (m *GetAllSlotsReply) GetSlots() map[string]*GetAllSlotsReply_SlotList
func (*GetAllSlotsReply) ProtoMessage ¶
func (*GetAllSlotsReply) ProtoMessage()
func (*GetAllSlotsReply) Reset ¶
func (m *GetAllSlotsReply) Reset()
func (*GetAllSlotsReply) String ¶
func (m *GetAllSlotsReply) String() string
type GetAllSlotsReply_SlotList ¶
type GetAllSlotsReply_SlotList struct {
Slot []*Slot `protobuf:"bytes,1,rep,name=slot" json:"slot,omitempty"`
}
func (*GetAllSlotsReply_SlotList) Descriptor ¶
func (*GetAllSlotsReply_SlotList) Descriptor() ([]byte, []int)
func (*GetAllSlotsReply_SlotList) GetSlot ¶
func (m *GetAllSlotsReply_SlotList) GetSlot() []*Slot
func (*GetAllSlotsReply_SlotList) ProtoMessage ¶
func (*GetAllSlotsReply_SlotList) ProtoMessage()
func (*GetAllSlotsReply_SlotList) Reset ¶
func (m *GetAllSlotsReply_SlotList) Reset()
func (*GetAllSlotsReply_SlotList) String ¶
func (m *GetAllSlotsReply_SlotList) String() string
type GetDevicePropertiesReply ¶
type GetDevicePropertiesReply struct {
Properties map[string]float64 `` /* 142-byte string literal not displayed */
}
func (*GetDevicePropertiesReply) Descriptor ¶
func (*GetDevicePropertiesReply) Descriptor() ([]byte, []int)
func (*GetDevicePropertiesReply) GetProperties ¶
func (m *GetDevicePropertiesReply) GetProperties() map[string]float64
func (*GetDevicePropertiesReply) ProtoMessage ¶
func (*GetDevicePropertiesReply) ProtoMessage()
func (*GetDevicePropertiesReply) Reset ¶
func (m *GetDevicePropertiesReply) Reset()
func (*GetDevicePropertiesReply) String ¶
func (m *GetDevicePropertiesReply) String() string
type GetOrdersReply ¶
type GetOrdersReply struct {
Orders []*Order `protobuf:"bytes,1,rep,name=orders" json:"orders,omitempty"`
}
func (*GetOrdersReply) Descriptor ¶
func (*GetOrdersReply) Descriptor() ([]byte, []int)
func (*GetOrdersReply) GetOrders ¶
func (m *GetOrdersReply) GetOrders() []*Order
func (*GetOrdersReply) ProtoMessage ¶
func (*GetOrdersReply) ProtoMessage()
func (*GetOrdersReply) Reset ¶
func (m *GetOrdersReply) Reset()
func (*GetOrdersReply) String ¶
func (m *GetOrdersReply) String() string
type GetOrdersRequest ¶
type GetOrdersRequest struct {
// Order keeps slot and type for searching
Order *Order `protobuf:"bytes,1,opt,name=order" json:"order,omitempty"`
// Count describe how namy results must be returned (order by price)
Count uint64 `protobuf:"varint,2,opt,name=count" json:"count,omitempty"`
}
func (*GetOrdersRequest) Descriptor ¶
func (*GetOrdersRequest) Descriptor() ([]byte, []int)
func (*GetOrdersRequest) GetCount ¶
func (m *GetOrdersRequest) GetCount() uint64
func (*GetOrdersRequest) GetOrder ¶
func (m *GetOrdersRequest) GetOrder() *Order
func (*GetOrdersRequest) ProtoMessage ¶
func (*GetOrdersRequest) ProtoMessage()
func (*GetOrdersRequest) Reset ¶
func (m *GetOrdersRequest) Reset()
func (*GetOrdersRequest) String ¶
func (m *GetOrdersRequest) String() string
type GetProcessingReply ¶
type GetProcessingReply struct {
Orders map[string]*GetProcessingReply_ProcessedOrder `` /* 132-byte string literal not displayed */
}
GetProcessingReply represent Node's local orders processing status
func (*GetProcessingReply) Descriptor ¶
func (*GetProcessingReply) Descriptor() ([]byte, []int)
func (*GetProcessingReply) GetOrders ¶
func (m *GetProcessingReply) GetOrders() map[string]*GetProcessingReply_ProcessedOrder
func (*GetProcessingReply) ProtoMessage ¶
func (*GetProcessingReply) ProtoMessage()
func (*GetProcessingReply) Reset ¶
func (m *GetProcessingReply) Reset()
func (*GetProcessingReply) String ¶
func (m *GetProcessingReply) String() string
type GetProcessingReply_ProcessedOrder ¶
type GetProcessingReply_ProcessedOrder struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
Status uint32 `protobuf:"varint,2,opt,name=status" json:"status,omitempty"`
Timestamp *Timestamp `protobuf:"bytes,3,opt,name=timestamp" json:"timestamp,omitempty"`
Extra string `protobuf:"bytes,4,opt,name=extra" json:"extra,omitempty"`
}
func (*GetProcessingReply_ProcessedOrder) Descriptor ¶
func (*GetProcessingReply_ProcessedOrder) Descriptor() ([]byte, []int)
func (*GetProcessingReply_ProcessedOrder) GetExtra ¶
func (m *GetProcessingReply_ProcessedOrder) GetExtra() string
func (*GetProcessingReply_ProcessedOrder) GetId ¶
func (m *GetProcessingReply_ProcessedOrder) GetId() string
func (*GetProcessingReply_ProcessedOrder) GetStatus ¶
func (m *GetProcessingReply_ProcessedOrder) GetStatus() uint32
func (*GetProcessingReply_ProcessedOrder) GetTimestamp ¶
func (m *GetProcessingReply_ProcessedOrder) GetTimestamp() *Timestamp
func (*GetProcessingReply_ProcessedOrder) ProtoMessage ¶
func (*GetProcessingReply_ProcessedOrder) ProtoMessage()
func (*GetProcessingReply_ProcessedOrder) Reset ¶
func (m *GetProcessingReply_ProcessedOrder) Reset()
func (*GetProcessingReply_ProcessedOrder) String ¶
func (m *GetProcessingReply_ProcessedOrder) String() string
type GetRegisteredWorkersReply ¶
type GetRegisteredWorkersReply struct {
Ids []*ID `protobuf:"bytes,1,rep,name=ids" json:"ids,omitempty"`
}
func (*GetRegisteredWorkersReply) Descriptor ¶
func (*GetRegisteredWorkersReply) Descriptor() ([]byte, []int)
func (*GetRegisteredWorkersReply) GetIds ¶
func (m *GetRegisteredWorkersReply) GetIds() []*ID
func (*GetRegisteredWorkersReply) ProtoMessage ¶
func (*GetRegisteredWorkersReply) ProtoMessage()
func (*GetRegisteredWorkersReply) Reset ¶
func (m *GetRegisteredWorkersReply) Reset()
func (*GetRegisteredWorkersReply) String ¶
func (m *GetRegisteredWorkersReply) String() string
type HubClient ¶
type HubClient interface {
// Ping should be used as Healthcheck for Hub
Ping(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PingReply, error)
// Status returns internal hub statistic
Status(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*HubStatusReply, error)
// List returns a list for connected Workers
List(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ListReply, error)
// Info returns info about given Worker
Info(ctx context.Context, in *ID, opts ...grpc.CallOption) (*InfoReply, error)
// TaskList returns info about all Tasks on all Workers on the Hub
TaskList(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*TaskListReply, error)
PushTask(ctx context.Context, opts ...grpc.CallOption) (Hub_PushTaskClient, error)
PullTask(ctx context.Context, in *PullTaskRequest, opts ...grpc.CallOption) (Hub_PullTaskClient, error)
// StartTask schedules the task associcated with a deal on some miner.
StartTask(ctx context.Context, in *HubStartTaskRequest, opts ...grpc.CallOption) (*HubStartTaskReply, error)
StopTask(ctx context.Context, in *ID, opts ...grpc.CallOption) (*Empty, error)
TaskStatus(ctx context.Context, in *ID, opts ...grpc.CallOption) (*TaskStatusReply, error)
MinerStatus(ctx context.Context, in *ID, opts ...grpc.CallOption) (*StatusMapReply, error)
TaskLogs(ctx context.Context, in *TaskLogsRequest, opts ...grpc.CallOption) (Hub_TaskLogsClient, error)
ProposeDeal(ctx context.Context, in *DealRequest, opts ...grpc.CallOption) (*Empty, error)
// Note: currently used for testing pusposes.
GetDealInfo(ctx context.Context, in *ID, opts ...grpc.CallOption) (*DealInfoReply, error)
DiscoverHub(ctx context.Context, in *DiscoverHubRequest, opts ...grpc.CallOption) (*Empty, error)
// Devices returns list of all available devices that this Hub awares of
// with tieir full description.
Devices(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*DevicesReply, error)
// MinerDevices returns a list of all available devices for given miner ID.
MinerDevices(ctx context.Context, in *ID, opts ...grpc.CallOption) (*DevicesReply, error)
// GetDeviceProperties allows to obtain previously assigned resource
// properties for a given device.
GetDeviceProperties(ctx context.Context, in *ID, opts ...grpc.CallOption) (*GetDevicePropertiesReply, error)
// SetDeviceProperties method allows to specify additional resource
// properties for a device specified by its ID.
// This may include GPU's capability to execute a well-known work such as
// Ethereum mining etc.
// Note, that this method overrides all previously specified properties.
SetDeviceProperties(ctx context.Context, in *SetDevicePropertiesRequest, opts ...grpc.CallOption) (*Empty, error)
// GetRegisteredWorkers returns a list of Worker IDs that
// allowed to connect to the Hub.
GetRegisteredWorkers(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetRegisteredWorkersReply, error)
// RegisterWorker adds Worker credentials to be able for them to connect
// to a Hub.
RegisterWorker(ctx context.Context, in *ID, opts ...grpc.CallOption) (*Empty, error)
// DeregisterWorkers removed Worker credentials denying them to connect to
// a Hub.
DeregisterWorker(ctx context.Context, in *ID, opts ...grpc.CallOption) (*Empty, error)
// GetSlots allows to obtain previously assigned slots for the Hub.
Slots(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*SlotsReply, error)
// AddSlot allows to assign a new slot.
// This method can fail if either there are no such resources found or it
// has been previourly assigned.
InsertSlot(ctx context.Context, in *InsertSlotRequest, opts ...grpc.CallOption) (*ID, error)
// RemoveSlot removes the speified slot if fully matches.
RemoveSlot(ctx context.Context, in *ID, opts ...grpc.CallOption) (*Empty, error)
}
func NewHubClient ¶
func NewHubClient(cc *grpc.ClientConn) HubClient
type HubManagementClient ¶
type HubManagementClient interface {
// Status produse a detailed info about Hub
Status(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*HubStatusReply, error)
// WorkersList prouces a list of connected Workers
WorkersList(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*ListReply, error)
// WorkersStatus produces a detailed info about a Worker with given ID
WorkerStatus(ctx context.Context, in *ID, opts ...grpc.CallOption) (*InfoReply, error)
// GetRegisteredWorkers produce a list of Workers IDs allowed
// to connect to this hub
GetRegisteredWorkers(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetRegisteredWorkersReply, error)
// RegisterWorkers allows Worker with given ID connect to Hub
RegisterWorker(ctx context.Context, in *ID, opts ...grpc.CallOption) (*Empty, error)
// DeregisterWorkers deny Worker with given ID connect to Hub
DeregisterWorker(ctx context.Context, in *ID, opts ...grpc.CallOption) (*Empty, error)
// Devices returns list of all available devices that this Hub awares of
// with tieir full description.
DeviceList(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*DevicesReply, error)
// GetDeviceProperties allows to obtain previously assigned resource
// properties for a given device.
GetDeviceProperties(ctx context.Context, in *ID, opts ...grpc.CallOption) (*GetDevicePropertiesReply, error)
// SetDeviceProperties method allows to specify additional resource
// properties for a device specified by its ID.
// This may include GPU's capability to execute a well-known work such as
// Ethereum mining etc.
SetDeviceProperties(ctx context.Context, in *SetDevicePropertiesRequest, opts ...grpc.CallOption) (*Empty, error)
// GetAskPlans allows to obtain previously assigned Ask Plans from for a given worker.
GetAskPlans(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*SlotsReply, error)
// CreateAskPlan allows to create rules
// for creating Ask orders on Marketplace
CreateAskPlan(ctx context.Context, in *InsertSlotRequest, opts ...grpc.CallOption) (*ID, error)
// RemoveAskPlan allows to remove rules
// for creating Ask orders on Marketplace
RemoveAskPlan(ctx context.Context, in *ID, opts ...grpc.CallOption) (*Empty, error)
// List produces a list of all running tasks on the Hub
TaskList(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*TaskListReply, error)
// Status produces a detailed info about task on the Hub
TaskStatus(ctx context.Context, in *ID, opts ...grpc.CallOption) (*TaskStatusReply, error)
}
func NewHubManagementClient ¶
func NewHubManagementClient(cc *grpc.ClientConn) HubManagementClient
type HubManagementServer ¶
type HubManagementServer interface {
// Status produse a detailed info about Hub
Status(context.Context, *Empty) (*HubStatusReply, error)
// WorkersList prouces a list of connected Workers
WorkersList(context.Context, *Empty) (*ListReply, error)
// WorkersStatus produces a detailed info about a Worker with given ID
WorkerStatus(context.Context, *ID) (*InfoReply, error)
// GetRegisteredWorkers produce a list of Workers IDs allowed
// to connect to this hub
GetRegisteredWorkers(context.Context, *Empty) (*GetRegisteredWorkersReply, error)
// RegisterWorkers allows Worker with given ID connect to Hub
RegisterWorker(context.Context, *ID) (*Empty, error)
// DeregisterWorkers deny Worker with given ID connect to Hub
DeregisterWorker(context.Context, *ID) (*Empty, error)
// Devices returns list of all available devices that this Hub awares of
// with tieir full description.
DeviceList(context.Context, *Empty) (*DevicesReply, error)
// GetDeviceProperties allows to obtain previously assigned resource
// properties for a given device.
GetDeviceProperties(context.Context, *ID) (*GetDevicePropertiesReply, error)
// SetDeviceProperties method allows to specify additional resource
// properties for a device specified by its ID.
// This may include GPU's capability to execute a well-known work such as
// Ethereum mining etc.
SetDeviceProperties(context.Context, *SetDevicePropertiesRequest) (*Empty, error)
// GetAskPlans allows to obtain previously assigned Ask Plans from for a given worker.
GetAskPlans(context.Context, *Empty) (*SlotsReply, error)
// CreateAskPlan allows to create rules
// for creating Ask orders on Marketplace
CreateAskPlan(context.Context, *InsertSlotRequest) (*ID, error)
// RemoveAskPlan allows to remove rules
// for creating Ask orders on Marketplace
RemoveAskPlan(context.Context, *ID) (*Empty, error)
// List produces a list of all running tasks on the Hub
TaskList(context.Context, *Empty) (*TaskListReply, error)
// Status produces a detailed info about task on the Hub
TaskStatus(context.Context, *ID) (*TaskStatusReply, error)
}
type HubServer ¶
type HubServer interface {
// Ping should be used as Healthcheck for Hub
Ping(context.Context, *Empty) (*PingReply, error)
// Status returns internal hub statistic
Status(context.Context, *Empty) (*HubStatusReply, error)
// List returns a list for connected Workers
List(context.Context, *Empty) (*ListReply, error)
// Info returns info about given Worker
Info(context.Context, *ID) (*InfoReply, error)
// TaskList returns info about all Tasks on all Workers on the Hub
TaskList(context.Context, *Empty) (*TaskListReply, error)
PushTask(Hub_PushTaskServer) error
PullTask(*PullTaskRequest, Hub_PullTaskServer) error
// StartTask schedules the task associcated with a deal on some miner.
StartTask(context.Context, *HubStartTaskRequest) (*HubStartTaskReply, error)
StopTask(context.Context, *ID) (*Empty, error)
TaskStatus(context.Context, *ID) (*TaskStatusReply, error)
MinerStatus(context.Context, *ID) (*StatusMapReply, error)
TaskLogs(*TaskLogsRequest, Hub_TaskLogsServer) error
ProposeDeal(context.Context, *DealRequest) (*Empty, error)
// Note: currently used for testing pusposes.
GetDealInfo(context.Context, *ID) (*DealInfoReply, error)
DiscoverHub(context.Context, *DiscoverHubRequest) (*Empty, error)
// Devices returns list of all available devices that this Hub awares of
// with tieir full description.
Devices(context.Context, *Empty) (*DevicesReply, error)
// MinerDevices returns a list of all available devices for given miner ID.
MinerDevices(context.Context, *ID) (*DevicesReply, error)
// GetDeviceProperties allows to obtain previously assigned resource
// properties for a given device.
GetDeviceProperties(context.Context, *ID) (*GetDevicePropertiesReply, error)
// SetDeviceProperties method allows to specify additional resource
// properties for a device specified by its ID.
// This may include GPU's capability to execute a well-known work such as
// Ethereum mining etc.
// Note, that this method overrides all previously specified properties.
SetDeviceProperties(context.Context, *SetDevicePropertiesRequest) (*Empty, error)
// GetRegisteredWorkers returns a list of Worker IDs that
// allowed to connect to the Hub.
GetRegisteredWorkers(context.Context, *Empty) (*GetRegisteredWorkersReply, error)
// RegisterWorker adds Worker credentials to be able for them to connect
// to a Hub.
RegisterWorker(context.Context, *ID) (*Empty, error)
// DeregisterWorkers removed Worker credentials denying them to connect to
// a Hub.
DeregisterWorker(context.Context, *ID) (*Empty, error)
// GetSlots allows to obtain previously assigned slots for the Hub.
Slots(context.Context, *Empty) (*SlotsReply, error)
// AddSlot allows to assign a new slot.
// This method can fail if either there are no such resources found or it
// has been previourly assigned.
InsertSlot(context.Context, *InsertSlotRequest) (*ID, error)
// RemoveSlot removes the speified slot if fully matches.
RemoveSlot(context.Context, *ID) (*Empty, error)
}
type HubStartTaskReply ¶
type HubStartTaskReply struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
Endpoint []string `protobuf:"bytes,2,rep,name=endpoint" json:"endpoint,omitempty"`
HubAddr string `protobuf:"bytes,3,opt,name=hubAddr" json:"hubAddr,omitempty"`
}
func (*HubStartTaskReply) Descriptor ¶
func (*HubStartTaskReply) Descriptor() ([]byte, []int)
func (*HubStartTaskReply) GetEndpoint ¶
func (m *HubStartTaskReply) GetEndpoint() []string
func (*HubStartTaskReply) GetHubAddr ¶
func (m *HubStartTaskReply) GetHubAddr() string
func (*HubStartTaskReply) GetId ¶
func (m *HubStartTaskReply) GetId() string
func (*HubStartTaskReply) ProtoMessage ¶
func (*HubStartTaskReply) ProtoMessage()
func (*HubStartTaskReply) Reset ¶
func (m *HubStartTaskReply) Reset()
func (*HubStartTaskReply) String ¶
func (m *HubStartTaskReply) String() string
type HubStartTaskRequest ¶
type HubStartTaskRequest struct {
// Deal points to the deal associated with workers where the task should be
// started.
Deal *Deal `protobuf:"bytes,1,opt,name=deal" json:"deal,omitempty"`
Registry string `protobuf:"bytes,2,opt,name=registry" json:"registry,omitempty"`
// Image specifies a Docker image name.
Image string `protobuf:"bytes,3,opt,name=image" json:"image,omitempty"`
Auth string `protobuf:"bytes,4,opt,name=auth" json:"auth,omitempty"`
PublicKeyData string `protobuf:"bytes,5,opt,name=PublicKeyData" json:"PublicKeyData,omitempty"`
CommitOnStop bool `protobuf:"varint,6,opt,name=commitOnStop" json:"commitOnStop,omitempty"`
Env map[string]string `` /* 126-byte string literal not displayed */
}
func (*HubStartTaskRequest) Descriptor ¶
func (*HubStartTaskRequest) Descriptor() ([]byte, []int)
func (*HubStartTaskRequest) GetAuth ¶
func (m *HubStartTaskRequest) GetAuth() string
func (*HubStartTaskRequest) GetCommitOnStop ¶
func (m *HubStartTaskRequest) GetCommitOnStop() bool
func (*HubStartTaskRequest) GetDeal ¶
func (m *HubStartTaskRequest) GetDeal() *Deal
func (*HubStartTaskRequest) GetEnv ¶
func (m *HubStartTaskRequest) GetEnv() map[string]string
func (*HubStartTaskRequest) GetImage ¶
func (m *HubStartTaskRequest) GetImage() string
func (*HubStartTaskRequest) GetPublicKeyData ¶
func (m *HubStartTaskRequest) GetPublicKeyData() string
func (*HubStartTaskRequest) GetRegistry ¶
func (m *HubStartTaskRequest) GetRegistry() string
func (*HubStartTaskRequest) ProtoMessage ¶
func (*HubStartTaskRequest) ProtoMessage()
func (*HubStartTaskRequest) Reset ¶
func (m *HubStartTaskRequest) Reset()
func (*HubStartTaskRequest) String ¶
func (m *HubStartTaskRequest) String() string
type HubStatusReply ¶
type HubStatusReply struct {
MinerCount uint64 `protobuf:"varint,1,opt,name=minerCount" json:"minerCount,omitempty"`
Uptime uint64 `protobuf:"varint,2,opt,name=uptime" json:"uptime,omitempty"`
Version string `protobuf:"bytes,3,opt,name=version" json:"version,omitempty"`
Platform string `protobuf:"bytes,4,opt,name=platform" json:"platform,omitempty"`
EthAddr string `protobuf:"bytes,5,opt,name=ethAddr" json:"ethAddr,omitempty"`
}
func (*HubStatusReply) Descriptor ¶
func (*HubStatusReply) Descriptor() ([]byte, []int)
func (*HubStatusReply) GetEthAddr ¶
func (m *HubStatusReply) GetEthAddr() string
func (*HubStatusReply) GetMinerCount ¶
func (m *HubStatusReply) GetMinerCount() uint64
func (*HubStatusReply) GetPlatform ¶
func (m *HubStatusReply) GetPlatform() string
func (*HubStatusReply) GetUptime ¶
func (m *HubStatusReply) GetUptime() uint64
func (*HubStatusReply) GetVersion ¶
func (m *HubStatusReply) GetVersion() string
func (*HubStatusReply) ProtoMessage ¶
func (*HubStatusReply) ProtoMessage()
func (*HubStatusReply) Reset ¶
func (m *HubStatusReply) Reset()
func (*HubStatusReply) String ¶
func (m *HubStatusReply) String() string
type Hub_PullTaskClient ¶
type Hub_PullTaskClient interface {
Recv() (*Chunk, error)
grpc.ClientStream
}
type Hub_PullTaskServer ¶
type Hub_PullTaskServer interface {
Send(*Chunk) error
grpc.ServerStream
}
type Hub_PushTaskClient ¶
type Hub_PushTaskServer ¶
type Hub_TaskLogsClient ¶
type Hub_TaskLogsClient interface {
Recv() (*TaskLogsChunk, error)
grpc.ClientStream
}
type Hub_TaskLogsServer ¶
type Hub_TaskLogsServer interface {
Send(*TaskLogsChunk) error
grpc.ServerStream
}
type ID ¶
type ID struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
}
func (*ID) Descriptor ¶
func (*ID) ProtoMessage ¶
func (*ID) ProtoMessage()
type InfoReply ¶
type InfoReply struct {
Usage map[string]*ResourceUsage `` /* 130-byte string literal not displayed */
Name string `protobuf:"bytes,2,opt,name=name" json:"name,omitempty"`
Capabilities *Capabilities `protobuf:"bytes,3,opt,name=capabilities" json:"capabilities,omitempty"`
}
func (*InfoReply) Descriptor ¶
func (*InfoReply) GetCapabilities ¶
func (m *InfoReply) GetCapabilities() *Capabilities
func (*InfoReply) GetUsage ¶
func (m *InfoReply) GetUsage() map[string]*ResourceUsage
func (*InfoReply) ProtoMessage ¶
func (*InfoReply) ProtoMessage()
type InsertSlotRequest ¶
type InsertSlotRequest struct {
Slot *Slot `protobuf:"bytes,1,opt,name=slot" json:"slot,omitempty"`
Price string `protobuf:"bytes,2,opt,name=price" json:"price,omitempty"`
BuyerID string `protobuf:"bytes,3,opt,name=buyerID" json:"buyerID,omitempty"`
}
func (*InsertSlotRequest) Descriptor ¶
func (*InsertSlotRequest) Descriptor() ([]byte, []int)
func (*InsertSlotRequest) GetBuyerID ¶
func (m *InsertSlotRequest) GetBuyerID() string
func (*InsertSlotRequest) GetPrice ¶
func (m *InsertSlotRequest) GetPrice() string
func (*InsertSlotRequest) GetSlot ¶
func (m *InsertSlotRequest) GetSlot() *Slot
func (*InsertSlotRequest) ProtoMessage ¶
func (*InsertSlotRequest) ProtoMessage()
func (*InsertSlotRequest) Reset ¶
func (m *InsertSlotRequest) Reset()
func (*InsertSlotRequest) String ¶
func (m *InsertSlotRequest) String() string
type ListReply ¶
type ListReply struct {
Info map[string]*ListReply_ListValue `` /* 128-byte string literal not displayed */
}
func (*ListReply) Descriptor ¶
func (*ListReply) GetInfo ¶
func (m *ListReply) GetInfo() map[string]*ListReply_ListValue
func (*ListReply) ProtoMessage ¶
func (*ListReply) ProtoMessage()
type ListReply_ListValue ¶
type ListReply_ListValue struct {
Values []string `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"`
}
func (*ListReply_ListValue) Descriptor ¶
func (*ListReply_ListValue) Descriptor() ([]byte, []int)
func (*ListReply_ListValue) GetValues ¶
func (m *ListReply_ListValue) GetValues() []string
func (*ListReply_ListValue) ProtoMessage ¶
func (*ListReply_ListValue) ProtoMessage()
func (*ListReply_ListValue) Reset ¶
func (m *ListReply_ListValue) Reset()
func (*ListReply_ListValue) String ¶
func (m *ListReply_ListValue) String() string
type LocatorClient ¶
type LocatorClient interface {
Announce(ctx context.Context, in *AnnounceRequest, opts ...grpc.CallOption) (*Empty, error)
Resolve(ctx context.Context, in *ResolveRequest, opts ...grpc.CallOption) (*ResolveReply, error)
}
func NewLocatorClient ¶
func NewLocatorClient(cc *grpc.ClientConn) LocatorClient
type LocatorServer ¶
type LocatorServer interface {
Announce(context.Context, *AnnounceRequest) (*Empty, error)
Resolve(context.Context, *ResolveRequest) (*ResolveReply, error)
}
type MarketClient ¶
type MarketClient interface {
GetOrders(ctx context.Context, in *GetOrdersRequest, opts ...grpc.CallOption) (*GetOrdersReply, error)
GetOrderByID(ctx context.Context, in *ID, opts ...grpc.CallOption) (*Order, error)
CreateOrder(ctx context.Context, in *Order, opts ...grpc.CallOption) (*Order, error)
CancelOrder(ctx context.Context, in *Order, opts ...grpc.CallOption) (*Empty, error)
// GetProcessing returns currently processing orders
// not required in Marketplace service
// must be implemented on Node
GetProcessing(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*GetProcessingReply, error)
}
func NewMarketClient ¶
func NewMarketClient(cc *grpc.ClientConn) MarketClient
type MarketServer ¶
type MarketServer interface {
GetOrders(context.Context, *GetOrdersRequest) (*GetOrdersReply, error)
GetOrderByID(context.Context, *ID) (*Order, error)
CreateOrder(context.Context, *Order) (*Order, error)
CancelOrder(context.Context, *Order) (*Empty, error)
// GetProcessing returns currently processing orders
// not required in Marketplace service
// must be implemented on Node
GetProcessing(context.Context, *Empty) (*GetProcessingReply, error)
}
type MemoryUsage ¶
type MemoryUsage struct {
MaxUsage uint64 `protobuf:"varint,1,opt,name=maxUsage" json:"maxUsage,omitempty"`
}
func (*MemoryUsage) Descriptor ¶
func (*MemoryUsage) Descriptor() ([]byte, []int)
func (*MemoryUsage) GetMaxUsage ¶
func (m *MemoryUsage) GetMaxUsage() uint64
func (*MemoryUsage) ProtoMessage ¶
func (*MemoryUsage) ProtoMessage()
func (*MemoryUsage) Reset ¶
func (m *MemoryUsage) Reset()
func (*MemoryUsage) String ¶
func (m *MemoryUsage) String() string
type MinerClient ¶
type MinerClient interface {
Ping(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*PingReply, error)
Info(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*InfoReply, error)
Handshake(ctx context.Context, in *MinerHandshakeRequest, opts ...grpc.CallOption) (*MinerHandshakeReply, error)
Save(ctx context.Context, in *SaveRequest, opts ...grpc.CallOption) (Miner_SaveClient, error)
Load(ctx context.Context, opts ...grpc.CallOption) (Miner_LoadClient, error)
Start(ctx context.Context, in *MinerStartRequest, opts ...grpc.CallOption) (*MinerStartReply, error)
Stop(ctx context.Context, in *ID, opts ...grpc.CallOption) (*Empty, error)
TasksStatus(ctx context.Context, opts ...grpc.CallOption) (Miner_TasksStatusClient, error)
TaskDetails(ctx context.Context, in *ID, opts ...grpc.CallOption) (*TaskStatusReply, error)
TaskLogs(ctx context.Context, in *TaskLogsRequest, opts ...grpc.CallOption) (Miner_TaskLogsClient, error)
DiscoverHub(ctx context.Context, in *DiscoverHubRequest, opts ...grpc.CallOption) (*Empty, error)
}
func NewMinerClient ¶
func NewMinerClient(cc *grpc.ClientConn) MinerClient
type MinerHandshakeReply ¶
type MinerHandshakeReply struct {
Miner string `protobuf:"bytes,1,opt,name=miner" json:"miner,omitempty"`
Capabilities *Capabilities `protobuf:"bytes,2,opt,name=capabilities" json:"capabilities,omitempty"`
NatType NATType `protobuf:"varint,3,opt,name=natType,enum=sonm.NATType" json:"natType,omitempty"`
}
func (*MinerHandshakeReply) Descriptor ¶
func (*MinerHandshakeReply) Descriptor() ([]byte, []int)
func (*MinerHandshakeReply) GetCapabilities ¶
func (m *MinerHandshakeReply) GetCapabilities() *Capabilities
func (*MinerHandshakeReply) GetMiner ¶
func (m *MinerHandshakeReply) GetMiner() string
func (*MinerHandshakeReply) GetNatType ¶
func (m *MinerHandshakeReply) GetNatType() NATType
func (*MinerHandshakeReply) ProtoMessage ¶
func (*MinerHandshakeReply) ProtoMessage()
func (*MinerHandshakeReply) Reset ¶
func (m *MinerHandshakeReply) Reset()
func (*MinerHandshakeReply) String ¶
func (m *MinerHandshakeReply) String() string
type MinerHandshakeRequest ¶
type MinerHandshakeRequest struct {
Hub string `protobuf:"bytes,1,opt,name=hub" json:"hub,omitempty"`
Tasks []*TaskInfo `protobuf:"bytes,2,rep,name=tasks" json:"tasks,omitempty"`
}
func (*MinerHandshakeRequest) Descriptor ¶
func (*MinerHandshakeRequest) Descriptor() ([]byte, []int)
func (*MinerHandshakeRequest) GetHub ¶
func (m *MinerHandshakeRequest) GetHub() string
func (*MinerHandshakeRequest) GetTasks ¶
func (m *MinerHandshakeRequest) GetTasks() []*TaskInfo
func (*MinerHandshakeRequest) ProtoMessage ¶
func (*MinerHandshakeRequest) ProtoMessage()
func (*MinerHandshakeRequest) Reset ¶
func (m *MinerHandshakeRequest) Reset()
func (*MinerHandshakeRequest) String ¶
func (m *MinerHandshakeRequest) String() string
type MinerServer ¶
type MinerServer interface {
Ping(context.Context, *Empty) (*PingReply, error)
Info(context.Context, *Empty) (*InfoReply, error)
Handshake(context.Context, *MinerHandshakeRequest) (*MinerHandshakeReply, error)
Save(*SaveRequest, Miner_SaveServer) error
Load(Miner_LoadServer) error
Start(context.Context, *MinerStartRequest) (*MinerStartReply, error)
Stop(context.Context, *ID) (*Empty, error)
TasksStatus(Miner_TasksStatusServer) error
TaskDetails(context.Context, *ID) (*TaskStatusReply, error)
TaskLogs(*TaskLogsRequest, Miner_TaskLogsServer) error
DiscoverHub(context.Context, *DiscoverHubRequest) (*Empty, error)
}
type MinerStartReply ¶
type MinerStartReply struct {
Container string `protobuf:"bytes,1,opt,name=container" json:"container,omitempty"`
Routes []*Route `protobuf:"bytes,2,rep,name=routes" json:"routes,omitempty"`
}
func (*MinerStartReply) Descriptor ¶
func (*MinerStartReply) Descriptor() ([]byte, []int)
func (*MinerStartReply) GetContainer ¶
func (m *MinerStartReply) GetContainer() string
func (*MinerStartReply) GetRoutes ¶
func (m *MinerStartReply) GetRoutes() []*Route
func (*MinerStartReply) ProtoMessage ¶
func (*MinerStartReply) ProtoMessage()
func (*MinerStartReply) Reset ¶
func (m *MinerStartReply) Reset()
func (*MinerStartReply) String ¶
func (m *MinerStartReply) String() string
type MinerStartRequest ¶
type MinerStartRequest struct {
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
Registry string `protobuf:"bytes,2,opt,name=registry" json:"registry,omitempty"`
Image string `protobuf:"bytes,3,opt,name=image" json:"image,omitempty"`
Auth string `protobuf:"bytes,4,opt,name=auth" json:"auth,omitempty"`
RestartPolicy *ContainerRestartPolicy `protobuf:"bytes,5,opt,name=restartPolicy" json:"restartPolicy,omitempty"`
Resources *TaskResourceRequirements `protobuf:"bytes,6,opt,name=resources" json:"resources,omitempty"`
PublicKeyData string `protobuf:"bytes,7,opt,name=PublicKeyData" json:"PublicKeyData,omitempty"`
CommitOnStop bool `protobuf:"varint,8,opt,name=commitOnStop" json:"commitOnStop,omitempty"`
Env map[string]string `` /* 126-byte string literal not displayed */
// OrderId describes an unique order identifier.
// It is here for proper resource allocation and limitation.
OrderId string `protobuf:"bytes,10,opt,name=orderId" json:"orderId,omitempty"`
}
func (*MinerStartRequest) Descriptor ¶
func (*MinerStartRequest) Descriptor() ([]byte, []int)
func (*MinerStartRequest) GetAuth ¶
func (m *MinerStartRequest) GetAuth() string
func (*MinerStartRequest) GetCommitOnStop ¶
func (m *MinerStartRequest) GetCommitOnStop() bool
func (*MinerStartRequest) GetEnv ¶
func (m *MinerStartRequest) GetEnv() map[string]string
func (*MinerStartRequest) GetId ¶
func (m *MinerStartRequest) GetId() string
func (*MinerStartRequest) GetImage ¶
func (m *MinerStartRequest) GetImage() string
func (*MinerStartRequest) GetOrderId ¶
func (m *MinerStartRequest) GetOrderId() string
func (*MinerStartRequest) GetPublicKeyData ¶
func (m *MinerStartRequest) GetPublicKeyData() string
func (*MinerStartRequest) GetRegistry ¶
func (m *MinerStartRequest) GetRegistry() string
func (*MinerStartRequest) GetResources ¶
func (m *MinerStartRequest) GetResources() *TaskResourceRequirements
func (*MinerStartRequest) GetRestartPolicy ¶
func (m *MinerStartRequest) GetRestartPolicy() *ContainerRestartPolicy
func (*MinerStartRequest) ProtoMessage ¶
func (*MinerStartRequest) ProtoMessage()
func (*MinerStartRequest) Reset ¶
func (m *MinerStartRequest) Reset()
func (*MinerStartRequest) String ¶
func (m *MinerStartRequest) String() string
type MinerStatusMapRequest ¶
type MinerStatusMapRequest struct {
}
func (*MinerStatusMapRequest) Descriptor ¶
func (*MinerStatusMapRequest) Descriptor() ([]byte, []int)
func (*MinerStatusMapRequest) ProtoMessage ¶
func (*MinerStatusMapRequest) ProtoMessage()
func (*MinerStatusMapRequest) Reset ¶
func (m *MinerStatusMapRequest) Reset()
func (*MinerStatusMapRequest) String ¶
func (m *MinerStatusMapRequest) String() string
type Miner_LoadClient ¶
type Miner_LoadServer ¶
type Miner_SaveClient ¶
type Miner_SaveClient interface {
Recv() (*Chunk, error)
grpc.ClientStream
}
type Miner_SaveServer ¶
type Miner_SaveServer interface {
Send(*Chunk) error
grpc.ServerStream
}
type Miner_TaskLogsClient ¶
type Miner_TaskLogsClient interface {
Recv() (*TaskLogsChunk, error)
grpc.ClientStream
}
type Miner_TaskLogsServer ¶
type Miner_TaskLogsServer interface {
Send(*TaskLogsChunk) error
grpc.ServerStream
}
type Miner_TasksStatusClient ¶
type Miner_TasksStatusClient interface {
Send(*MinerStatusMapRequest) error
Recv() (*StatusMapReply, error)
grpc.ClientStream
}
type Miner_TasksStatusServer ¶
type Miner_TasksStatusServer interface {
Send(*StatusMapReply) error
Recv() (*MinerStatusMapRequest, error)
grpc.ServerStream
}
type NetworkType ¶
type NetworkType int32
const ( NetworkType_NO_NETWORK NetworkType = 0 NetworkType_OUTBOUND NetworkType = 1 NetworkType_INCOMING NetworkType = 2 )
func (NetworkType) EnumDescriptor ¶
func (NetworkType) EnumDescriptor() ([]byte, []int)
func (NetworkType) String ¶
func (x NetworkType) String() string
type NetworkUsage ¶
type NetworkUsage struct {
TxBytes uint64 `protobuf:"varint,1,opt,name=txBytes" json:"txBytes,omitempty"`
RxBytes uint64 `protobuf:"varint,2,opt,name=rxBytes" json:"rxBytes,omitempty"`
TxPackets uint64 `protobuf:"varint,3,opt,name=txPackets" json:"txPackets,omitempty"`
RxPackets uint64 `protobuf:"varint,4,opt,name=rxPackets" json:"rxPackets,omitempty"`
TxErrors uint64 `protobuf:"varint,5,opt,name=txErrors" json:"txErrors,omitempty"`
RxErrors uint64 `protobuf:"varint,6,opt,name=rxErrors" json:"rxErrors,omitempty"`
TxDropped uint64 `protobuf:"varint,7,opt,name=txDropped" json:"txDropped,omitempty"`
RxDropped uint64 `protobuf:"varint,8,opt,name=rxDropped" json:"rxDropped,omitempty"`
}
func (*NetworkUsage) Descriptor ¶
func (*NetworkUsage) Descriptor() ([]byte, []int)
func (*NetworkUsage) GetRxBytes ¶
func (m *NetworkUsage) GetRxBytes() uint64
func (*NetworkUsage) GetRxDropped ¶
func (m *NetworkUsage) GetRxDropped() uint64
func (*NetworkUsage) GetRxErrors ¶
func (m *NetworkUsage) GetRxErrors() uint64
func (*NetworkUsage) GetRxPackets ¶
func (m *NetworkUsage) GetRxPackets() uint64
func (*NetworkUsage) GetTxBytes ¶
func (m *NetworkUsage) GetTxBytes() uint64
func (*NetworkUsage) GetTxDropped ¶
func (m *NetworkUsage) GetTxDropped() uint64
func (*NetworkUsage) GetTxErrors ¶
func (m *NetworkUsage) GetTxErrors() uint64
func (*NetworkUsage) GetTxPackets ¶
func (m *NetworkUsage) GetTxPackets() uint64
func (*NetworkUsage) ProtoMessage ¶
func (*NetworkUsage) ProtoMessage()
func (*NetworkUsage) Reset ¶
func (m *NetworkUsage) Reset()
func (*NetworkUsage) String ¶
func (m *NetworkUsage) String() string
type Order ¶
type Order struct {
// Order ID, UUIDv4
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
// Buyer's EtherumID
ByuerID string `protobuf:"bytes,2,opt,name=byuerID" json:"byuerID,omitempty"`
// Supplier's is EtherumID
SupplierID string `protobuf:"bytes,3,opt,name=supplierID" json:"supplierID,omitempty"`
// Order price
Price string `protobuf:"bytes,4,opt,name=price" json:"price,omitempty"`
// Order type (Bid or Ask)
OrderType OrderType `protobuf:"varint,5,opt,name=orderType,enum=sonm.OrderType" json:"orderType,omitempty"`
// Slot describe resource requiements
Slot *Slot `protobuf:"bytes,6,opt,name=slot" json:"slot,omitempty"`
}
func (*Order) Descriptor ¶
func (*Order) GetByuerID ¶
func (*Order) GetOrderType ¶
func (*Order) GetSupplierID ¶
func (*Order) ProtoMessage ¶
func (*Order) ProtoMessage()
type PingReply ¶
type PingReply struct {
Status string `protobuf:"bytes,1,opt,name=status" json:"status,omitempty"`
}
func (*PingReply) Descriptor ¶
func (*PingReply) ProtoMessage ¶
func (*PingReply) ProtoMessage()
type Progress ¶
type Progress struct {
Size int64 `protobuf:"varint,1,opt,name=size" json:"size,omitempty"`
}
func (*Progress) Descriptor ¶
func (*Progress) ProtoMessage ¶
func (*Progress) ProtoMessage()
type PullTaskRequest ¶
type PullTaskRequest struct {
DealId string `protobuf:"bytes,1,opt,name=dealId" json:"dealId,omitempty"`
TaskId string `protobuf:"bytes,2,opt,name=taskId" json:"taskId,omitempty"`
}
func (*PullTaskRequest) Descriptor ¶
func (*PullTaskRequest) Descriptor() ([]byte, []int)
func (*PullTaskRequest) GetDealId ¶
func (m *PullTaskRequest) GetDealId() string
func (*PullTaskRequest) GetTaskId ¶
func (m *PullTaskRequest) GetTaskId() string
func (*PullTaskRequest) ProtoMessage ¶
func (*PullTaskRequest) ProtoMessage()
func (*PullTaskRequest) Reset ¶
func (m *PullTaskRequest) Reset()
func (*PullTaskRequest) String ¶
func (m *PullTaskRequest) String() string
type RAMDevice ¶
type RAMDevice struct {
Total uint64 `protobuf:"varint,1,opt,name=total" json:"total,omitempty"`
Used uint64 `protobuf:"varint,2,opt,name=used" json:"used,omitempty"`
}
func (*RAMDevice) Descriptor ¶
func (*RAMDevice) ProtoMessage ¶
func (*RAMDevice) ProtoMessage()
type RemoveSlotRequest ¶
type RemoveSlotRequest struct {
ID string `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"`
Slot *Slot `protobuf:"bytes,2,opt,name=slot" json:"slot,omitempty"`
}
func (*RemoveSlotRequest) Descriptor ¶
func (*RemoveSlotRequest) Descriptor() ([]byte, []int)
func (*RemoveSlotRequest) GetID ¶
func (m *RemoveSlotRequest) GetID() string
func (*RemoveSlotRequest) GetSlot ¶
func (m *RemoveSlotRequest) GetSlot() *Slot
func (*RemoveSlotRequest) ProtoMessage ¶
func (*RemoveSlotRequest) ProtoMessage()
func (*RemoveSlotRequest) Reset ¶
func (m *RemoveSlotRequest) Reset()
func (*RemoveSlotRequest) String ¶
func (m *RemoveSlotRequest) String() string
type ResolveReply ¶
type ResolveReply struct {
IpAddr []string `protobuf:"bytes,1,rep,name=ipAddr" json:"ipAddr,omitempty"`
}
func (*ResolveReply) Descriptor ¶
func (*ResolveReply) Descriptor() ([]byte, []int)
func (*ResolveReply) GetIpAddr ¶
func (m *ResolveReply) GetIpAddr() []string
func (*ResolveReply) ProtoMessage ¶
func (*ResolveReply) ProtoMessage()
func (*ResolveReply) Reset ¶
func (m *ResolveReply) Reset()
func (*ResolveReply) String ¶
func (m *ResolveReply) String() string
type ResolveRequest ¶
type ResolveRequest struct {
EthAddr string `protobuf:"bytes,1,opt,name=ethAddr" json:"ethAddr,omitempty"`
}
func (*ResolveRequest) Descriptor ¶
func (*ResolveRequest) Descriptor() ([]byte, []int)
func (*ResolveRequest) GetEthAddr ¶
func (m *ResolveRequest) GetEthAddr() string
func (*ResolveRequest) ProtoMessage ¶
func (*ResolveRequest) ProtoMessage()
func (*ResolveRequest) Reset ¶
func (m *ResolveRequest) Reset()
func (*ResolveRequest) String ¶
func (m *ResolveRequest) String() string
type ResourceUsage ¶
type ResourceUsage struct {
Cpu *CPUUsage `protobuf:"bytes,1,opt,name=cpu" json:"cpu,omitempty"`
Memory *MemoryUsage `protobuf:"bytes,2,opt,name=memory" json:"memory,omitempty"`
Network map[string]*NetworkUsage `` /* 134-byte string literal not displayed */
}
func (*ResourceUsage) Descriptor ¶
func (*ResourceUsage) Descriptor() ([]byte, []int)
func (*ResourceUsage) GetCpu ¶
func (m *ResourceUsage) GetCpu() *CPUUsage
func (*ResourceUsage) GetMemory ¶
func (m *ResourceUsage) GetMemory() *MemoryUsage
func (*ResourceUsage) GetNetwork ¶
func (m *ResourceUsage) GetNetwork() map[string]*NetworkUsage
func (*ResourceUsage) ProtoMessage ¶
func (*ResourceUsage) ProtoMessage()
func (*ResourceUsage) Reset ¶
func (m *ResourceUsage) Reset()
func (*ResourceUsage) String ¶
func (m *ResourceUsage) String() string
type Resources ¶
type Resources struct {
// CPU core count
CpuCores uint64 `protobuf:"varint,1,opt,name=cpuCores" json:"cpuCores,omitempty"`
// RAM, in bytes
RamBytes uint64 `protobuf:"varint,2,opt,name=ramBytes" json:"ramBytes,omitempty"`
// GPU devices count
GpuCount GPUCount `protobuf:"varint,3,opt,name=gpuCount,enum=sonm.GPUCount" json:"gpuCount,omitempty"`
// todo: discuss
// storage volume, in Megabytes
Storage uint64 `protobuf:"varint,4,opt,name=storage" json:"storage,omitempty"`
// Inbound network traffic (the higher value), in bytes
NetTrafficIn uint64 `protobuf:"varint,5,opt,name=netTrafficIn" json:"netTrafficIn,omitempty"`
// Outbound network traffic (the higher value), in bytes
NetTrafficOut uint64 `protobuf:"varint,6,opt,name=netTrafficOut" json:"netTrafficOut,omitempty"`
// Allowed network connections
NetworkType NetworkType `protobuf:"varint,7,opt,name=networkType,enum=sonm.NetworkType" json:"networkType,omitempty"`
// Other properties/benchmarks. The higher means better.
Properties map[string]float64 `` /* 142-byte string literal not displayed */
}
func (*Resources) Descriptor ¶
func (*Resources) GetCpuCores ¶
func (*Resources) GetGpuCount ¶
func (*Resources) GetNetTrafficIn ¶
func (*Resources) GetNetTrafficOut ¶
func (*Resources) GetNetworkType ¶
func (m *Resources) GetNetworkType() NetworkType
func (*Resources) GetProperties ¶
func (*Resources) GetRamBytes ¶
func (*Resources) GetStorage ¶
func (*Resources) ProtoMessage ¶
func (*Resources) ProtoMessage()
type Route ¶
type Route struct {
Port string `protobuf:"bytes,1,opt,name=port" json:"port,omitempty"`
Endpoint *SocketAddr `protobuf:"bytes,2,opt,name=endpoint" json:"endpoint,omitempty"`
}
func (*Route) Descriptor ¶
func (*Route) GetEndpoint ¶
func (m *Route) GetEndpoint() *SocketAddr
func (*Route) ProtoMessage ¶
func (*Route) ProtoMessage()
type SaveRequest ¶
type SaveRequest struct {
ImageID string `protobuf:"bytes,1,opt,name=imageID" json:"imageID,omitempty"`
}
func (*SaveRequest) Descriptor ¶
func (*SaveRequest) Descriptor() ([]byte, []int)
func (*SaveRequest) GetImageID ¶
func (m *SaveRequest) GetImageID() string
func (*SaveRequest) ProtoMessage ¶
func (*SaveRequest) ProtoMessage()
func (*SaveRequest) Reset ¶
func (m *SaveRequest) Reset()
func (*SaveRequest) String ¶
func (m *SaveRequest) String() string
type SetDevicePropertiesRequest ¶
type SetDevicePropertiesRequest struct {
// Device identifier.
ID string `protobuf:"bytes,1,opt,name=ID" json:"ID,omitempty"`
// Its properties.
Properties map[string]float64 `` /* 142-byte string literal not displayed */
}
func (*SetDevicePropertiesRequest) Descriptor ¶
func (*SetDevicePropertiesRequest) Descriptor() ([]byte, []int)
func (*SetDevicePropertiesRequest) GetID ¶
func (m *SetDevicePropertiesRequest) GetID() string
func (*SetDevicePropertiesRequest) GetProperties ¶
func (m *SetDevicePropertiesRequest) GetProperties() map[string]float64
func (*SetDevicePropertiesRequest) ProtoMessage ¶
func (*SetDevicePropertiesRequest) ProtoMessage()
func (*SetDevicePropertiesRequest) Reset ¶
func (m *SetDevicePropertiesRequest) Reset()
func (*SetDevicePropertiesRequest) String ¶
func (m *SetDevicePropertiesRequest) String() string
type Slot ¶
type Slot struct {
// Buyer’s rating. Got from Buyer’s profile for BID orders rating_supplier.
BuyerRating int64 `protobuf:"varint,1,opt,name=buyerRating" json:"buyerRating,omitempty"`
// Supplier’s rating. Got from Supplier’s profile for ASK orders.
SupplierRating int64 `protobuf:"varint,2,opt,name=supplierRating" json:"supplierRating,omitempty"`
// Geo represent Worker's position
Geo *Geo `protobuf:"bytes,3,opt,name=geo" json:"geo,omitempty"`
// Hardware resources requirements
Resources *Resources `protobuf:"bytes,4,opt,name=resources" json:"resources,omitempty"`
// Duration is resource rent duration in seconds
Duration uint64 `protobuf:"varint,5,opt,name=duration" json:"duration,omitempty"`
}
func (*Slot) Descriptor ¶
func (*Slot) GetBuyerRating ¶
func (*Slot) GetDuration ¶
func (*Slot) GetResources ¶
func (*Slot) GetSupplierRating ¶
func (*Slot) ProtoMessage ¶
func (*Slot) ProtoMessage()
type SlotsReply ¶
func (*SlotsReply) Descriptor ¶
func (*SlotsReply) Descriptor() ([]byte, []int)
func (*SlotsReply) GetSlots ¶
func (m *SlotsReply) GetSlots() map[string]*Slot
func (*SlotsReply) ProtoMessage ¶
func (*SlotsReply) ProtoMessage()
func (*SlotsReply) Reset ¶
func (m *SlotsReply) Reset()
func (*SlotsReply) String ¶
func (m *SlotsReply) String() string
type SocketAddr ¶
type SocketAddr struct {
Addr string `protobuf:"bytes,1,opt,name=addr" json:"addr,omitempty"`
//
// Actually an `uint16` here. Protobuf is so clear and handy.
Port uint32 `protobuf:"varint,2,opt,name=port" json:"port,omitempty"`
}
func (*SocketAddr) Descriptor ¶
func (*SocketAddr) Descriptor() ([]byte, []int)
func (*SocketAddr) GetAddr ¶
func (m *SocketAddr) GetAddr() string
func (*SocketAddr) GetPort ¶
func (m *SocketAddr) GetPort() uint32
func (*SocketAddr) ProtoMessage ¶
func (*SocketAddr) ProtoMessage()
func (*SocketAddr) Reset ¶
func (m *SocketAddr) Reset()
func (*SocketAddr) String ¶
func (m *SocketAddr) String() string
type StatusMapReply ¶
type StatusMapReply struct {
Statuses map[string]*TaskStatusReply `` /* 136-byte string literal not displayed */
}
func (*StatusMapReply) Descriptor ¶
func (*StatusMapReply) Descriptor() ([]byte, []int)
func (*StatusMapReply) GetStatuses ¶
func (m *StatusMapReply) GetStatuses() map[string]*TaskStatusReply
func (*StatusMapReply) ProtoMessage ¶
func (*StatusMapReply) ProtoMessage()
func (*StatusMapReply) Reset ¶
func (m *StatusMapReply) Reset()
func (*StatusMapReply) String ¶
func (m *StatusMapReply) String() string
type TaskID ¶
type TaskID struct {
// Id is task ID itself
Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"`
// HubID is ID of hub on which task if running
HubAddr string `protobuf:"bytes,2,opt,name=hubAddr" json:"hubAddr,omitempty"`
}
func (*TaskID) Descriptor ¶
func (*TaskID) GetHubAddr ¶
func (*TaskID) ProtoMessage ¶
func (*TaskID) ProtoMessage()
type TaskInfo ¶
type TaskInfo struct {
Request *MinerStartRequest `protobuf:"bytes,1,opt,name=request" json:"request,omitempty"`
Reply *MinerStartReply `protobuf:"bytes,2,opt,name=reply" json:"reply,omitempty"`
}
func (*TaskInfo) Descriptor ¶
func (*TaskInfo) GetReply ¶
func (m *TaskInfo) GetReply() *MinerStartReply
func (*TaskInfo) GetRequest ¶
func (m *TaskInfo) GetRequest() *MinerStartRequest
func (*TaskInfo) ProtoMessage ¶
func (*TaskInfo) ProtoMessage()
type TaskListReply ¶
type TaskListReply struct {
Info map[string]*TaskListReply_TaskInfo `` /* 128-byte string literal not displayed */
}
func (*TaskListReply) Descriptor ¶
func (*TaskListReply) Descriptor() ([]byte, []int)
func (*TaskListReply) GetInfo ¶
func (m *TaskListReply) GetInfo() map[string]*TaskListReply_TaskInfo
func (*TaskListReply) ProtoMessage ¶
func (*TaskListReply) ProtoMessage()
func (*TaskListReply) Reset ¶
func (m *TaskListReply) Reset()
func (*TaskListReply) String ¶
func (m *TaskListReply) String() string
type TaskListReply_TaskInfo ¶
type TaskListReply_TaskInfo struct {
Tasks map[string]*TaskStatusReply `` /* 130-byte string literal not displayed */
}
func (*TaskListReply_TaskInfo) Descriptor ¶
func (*TaskListReply_TaskInfo) Descriptor() ([]byte, []int)
func (*TaskListReply_TaskInfo) GetTasks ¶
func (m *TaskListReply_TaskInfo) GetTasks() map[string]*TaskStatusReply
func (*TaskListReply_TaskInfo) ProtoMessage ¶
func (*TaskListReply_TaskInfo) ProtoMessage()
func (*TaskListReply_TaskInfo) Reset ¶
func (m *TaskListReply_TaskInfo) Reset()
func (*TaskListReply_TaskInfo) String ¶
func (m *TaskListReply_TaskInfo) String() string
type TaskListRequest ¶
type TaskListRequest struct {
// HubID is hub eth id;
// If empty - collect task info from all hubs
HubID string `protobuf:"bytes,1,opt,name=hubID" json:"hubID,omitempty"`
}
func (*TaskListRequest) Descriptor ¶
func (*TaskListRequest) Descriptor() ([]byte, []int)
func (*TaskListRequest) GetHubID ¶
func (m *TaskListRequest) GetHubID() string
func (*TaskListRequest) ProtoMessage ¶
func (*TaskListRequest) ProtoMessage()
func (*TaskListRequest) Reset ¶
func (m *TaskListRequest) Reset()
func (*TaskListRequest) String ¶
func (m *TaskListRequest) String() string
type TaskLogsChunk ¶
type TaskLogsChunk struct {
Data []byte `protobuf:"bytes,1,opt,name=data,proto3" json:"data,omitempty"`
}
func (*TaskLogsChunk) Descriptor ¶
func (*TaskLogsChunk) Descriptor() ([]byte, []int)
func (*TaskLogsChunk) GetData ¶
func (m *TaskLogsChunk) GetData() []byte
func (*TaskLogsChunk) ProtoMessage ¶
func (*TaskLogsChunk) ProtoMessage()
func (*TaskLogsChunk) Reset ¶
func (m *TaskLogsChunk) Reset()
func (*TaskLogsChunk) String ¶
func (m *TaskLogsChunk) String() string
type TaskLogsRequest ¶
type TaskLogsRequest struct {
Type TaskLogsRequest_Type `protobuf:"varint,1,opt,name=type,enum=sonm.TaskLogsRequest_Type" json:"type,omitempty"`
Id string `protobuf:"bytes,2,opt,name=id" json:"id,omitempty"`
Since string `protobuf:"bytes,3,opt,name=since" json:"since,omitempty"`
AddTimestamps bool `protobuf:"varint,4,opt,name=addTimestamps" json:"addTimestamps,omitempty"`
Follow bool `protobuf:"varint,5,opt,name=Follow" json:"Follow,omitempty"`
Tail string `protobuf:"bytes,6,opt,name=Tail" json:"Tail,omitempty"`
Details bool `protobuf:"varint,7,opt,name=Details" json:"Details,omitempty"`
HubAddr string `protobuf:"bytes,8,opt,name=hubAddr" json:"hubAddr,omitempty"`
}
func (*TaskLogsRequest) Descriptor ¶
func (*TaskLogsRequest) Descriptor() ([]byte, []int)
func (*TaskLogsRequest) GetAddTimestamps ¶
func (m *TaskLogsRequest) GetAddTimestamps() bool
func (*TaskLogsRequest) GetDetails ¶
func (m *TaskLogsRequest) GetDetails() bool
func (*TaskLogsRequest) GetFollow ¶
func (m *TaskLogsRequest) GetFollow() bool
func (*TaskLogsRequest) GetHubAddr ¶
func (m *TaskLogsRequest) GetHubAddr() string
func (*TaskLogsRequest) GetId ¶
func (m *TaskLogsRequest) GetId() string
func (*TaskLogsRequest) GetSince ¶
func (m *TaskLogsRequest) GetSince() string
func (*TaskLogsRequest) GetTail ¶
func (m *TaskLogsRequest) GetTail() string
func (*TaskLogsRequest) GetType ¶
func (m *TaskLogsRequest) GetType() TaskLogsRequest_Type
func (*TaskLogsRequest) ProtoMessage ¶
func (*TaskLogsRequest) ProtoMessage()
func (*TaskLogsRequest) Reset ¶
func (m *TaskLogsRequest) Reset()
func (*TaskLogsRequest) String ¶
func (m *TaskLogsRequest) String() string
type TaskLogsRequest_Type ¶
type TaskLogsRequest_Type int32
const ( TaskLogsRequest_STDOUT TaskLogsRequest_Type = 0 TaskLogsRequest_STDERR TaskLogsRequest_Type = 1 TaskLogsRequest_BOTH TaskLogsRequest_Type = 2 )
func (TaskLogsRequest_Type) EnumDescriptor ¶
func (TaskLogsRequest_Type) EnumDescriptor() ([]byte, []int)
func (TaskLogsRequest_Type) String ¶
func (x TaskLogsRequest_Type) String() string
type TaskManagementClient ¶
type TaskManagementClient interface {
// List produces a list of all tasks running on different SONM nodes
List(ctx context.Context, in *TaskListRequest, opts ...grpc.CallOption) (*TaskListReply, error)
// PushTask pushes image to Worker
PushTask(ctx context.Context, opts ...grpc.CallOption) (TaskManagement_PushTaskClient, error)
// Start starts a task on given resource
Start(ctx context.Context, in *HubStartTaskRequest, opts ...grpc.CallOption) (*HubStartTaskReply, error)
// Status produces a task status by their ID
Status(ctx context.Context, in *TaskID, opts ...grpc.CallOption) (*TaskStatusReply, error)
// Logs retrieves a task log (stdin/stderr) from given task
Logs(ctx context.Context, in *TaskLogsRequest, opts ...grpc.CallOption) (TaskManagement_LogsClient, error)
// Stop stops a task by their ID
Stop(ctx context.Context, in *TaskID, opts ...grpc.CallOption) (*Empty, error)
// PullTask pulls task image back
PullTask(ctx context.Context, in *PullTaskRequest, opts ...grpc.CallOption) (TaskManagement_PullTaskClient, error)
}
func NewTaskManagementClient ¶
func NewTaskManagementClient(cc *grpc.ClientConn) TaskManagementClient
type TaskManagementServer ¶
type TaskManagementServer interface {
// List produces a list of all tasks running on different SONM nodes
List(context.Context, *TaskListRequest) (*TaskListReply, error)
// PushTask pushes image to Worker
PushTask(TaskManagement_PushTaskServer) error
// Start starts a task on given resource
Start(context.Context, *HubStartTaskRequest) (*HubStartTaskReply, error)
// Status produces a task status by their ID
Status(context.Context, *TaskID) (*TaskStatusReply, error)
// Logs retrieves a task log (stdin/stderr) from given task
Logs(*TaskLogsRequest, TaskManagement_LogsServer) error
// Stop stops a task by their ID
Stop(context.Context, *TaskID) (*Empty, error)
// PullTask pulls task image back
PullTask(*PullTaskRequest, TaskManagement_PullTaskServer) error
}
type TaskManagement_LogsClient ¶
type TaskManagement_LogsClient interface {
Recv() (*TaskLogsChunk, error)
grpc.ClientStream
}
type TaskManagement_LogsServer ¶
type TaskManagement_LogsServer interface {
Send(*TaskLogsChunk) error
grpc.ServerStream
}
type TaskManagement_PullTaskClient ¶
type TaskManagement_PullTaskClient interface {
Recv() (*Chunk, error)
grpc.ClientStream
}
type TaskManagement_PullTaskServer ¶
type TaskManagement_PullTaskServer interface {
Send(*Chunk) error
grpc.ServerStream
}
type TaskResourceRequirements ¶
type TaskResourceRequirements struct {
// CPUCores specifies the number of CPU cores required.
CPUCores uint64 `protobuf:"varint,1,opt,name=CPUCores" json:"CPUCores,omitempty"`
// MaxMemory specifies the maximum memory in bytes required.
MaxMemory int64 `protobuf:"varint,2,opt,name=maxMemory" json:"maxMemory,omitempty"`
// GPUCount Describes whether a task requires GPU support.
GPUSupport GPUCount `protobuf:"varint,3,opt,name=GPUSupport,enum=sonm.GPUCount" json:"GPUSupport,omitempty"`
}
func (*TaskResourceRequirements) Descriptor ¶
func (*TaskResourceRequirements) Descriptor() ([]byte, []int)
func (*TaskResourceRequirements) GetCPUCores ¶
func (m *TaskResourceRequirements) GetCPUCores() uint64
func (*TaskResourceRequirements) GetGPUSupport ¶
func (m *TaskResourceRequirements) GetGPUSupport() GPUCount
func (*TaskResourceRequirements) GetMaxMemory ¶
func (m *TaskResourceRequirements) GetMaxMemory() int64
func (*TaskResourceRequirements) ProtoMessage ¶
func (*TaskResourceRequirements) ProtoMessage()
func (*TaskResourceRequirements) Reset ¶
func (m *TaskResourceRequirements) Reset()
func (*TaskResourceRequirements) String ¶
func (m *TaskResourceRequirements) String() string
type TaskStatusReply ¶
type TaskStatusReply struct {
Status TaskStatusReply_Status `protobuf:"varint,1,opt,name=status,enum=sonm.TaskStatusReply_Status" json:"status,omitempty"`
ImageName string `protobuf:"bytes,2,opt,name=imageName" json:"imageName,omitempty"`
Ports string `protobuf:"bytes,3,opt,name=ports" json:"ports,omitempty"`
Uptime uint64 `protobuf:"varint,4,opt,name=uptime" json:"uptime,omitempty"`
Usage *ResourceUsage `protobuf:"bytes,5,opt,name=usage" json:"usage,omitempty"`
AvailableResources *AvailableResources `protobuf:"bytes,6,opt,name=availableResources" json:"availableResources,omitempty"`
MinerID string `protobuf:"bytes,7,opt,name=minerID" json:"minerID,omitempty"`
}
func (*TaskStatusReply) Descriptor ¶
func (*TaskStatusReply) Descriptor() ([]byte, []int)
func (*TaskStatusReply) GetAvailableResources ¶
func (m *TaskStatusReply) GetAvailableResources() *AvailableResources
func (*TaskStatusReply) GetImageName ¶
func (m *TaskStatusReply) GetImageName() string
func (*TaskStatusReply) GetMinerID ¶
func (m *TaskStatusReply) GetMinerID() string
func (*TaskStatusReply) GetPorts ¶
func (m *TaskStatusReply) GetPorts() string
func (*TaskStatusReply) GetStatus ¶
func (m *TaskStatusReply) GetStatus() TaskStatusReply_Status
func (*TaskStatusReply) GetUptime ¶
func (m *TaskStatusReply) GetUptime() uint64
func (*TaskStatusReply) GetUsage ¶
func (m *TaskStatusReply) GetUsage() *ResourceUsage
func (*TaskStatusReply) ProtoMessage ¶
func (*TaskStatusReply) ProtoMessage()
func (*TaskStatusReply) Reset ¶
func (m *TaskStatusReply) Reset()
func (*TaskStatusReply) String ¶
func (m *TaskStatusReply) String() string
type TaskStatusReply_Status ¶
type TaskStatusReply_Status int32
const ( TaskStatusReply_UNKNOWN TaskStatusReply_Status = 0 TaskStatusReply_SPOOLING TaskStatusReply_Status = 1 TaskStatusReply_SPAWNING TaskStatusReply_Status = 2 TaskStatusReply_RUNNING TaskStatusReply_Status = 3 TaskStatusReply_FINISHED TaskStatusReply_Status = 4 TaskStatusReply_BROKEN TaskStatusReply_Status = 5 )
func (TaskStatusReply_Status) EnumDescriptor ¶
func (TaskStatusReply_Status) EnumDescriptor() ([]byte, []int)
func (TaskStatusReply_Status) String ¶
func (x TaskStatusReply_Status) String() string
type Timestamp ¶
type Timestamp struct {
// Represents seconds of UTC time since Unix epoch 1970-01-01T00:00:00Z.
// Must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive.
Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"`
// Non-negative fractions of a second at nanosecond resolution. Negative
// second values with fractions must still have non-negative nanos values
// that count forward in time. Must be from 0 to 999'999'999
// inclusive.
Nanos int32 `protobuf:"varint,2,opt,name=nanos" json:"nanos,omitempty"`
}
func (*Timestamp) Descriptor ¶
func (*Timestamp) GetSeconds ¶
func (*Timestamp) ProtoMessage ¶
func (*Timestamp) ProtoMessage()
Click to show internal directories.
Click to hide internal directories.