Documentation ¶
Index ¶
- func ListGPUProviders(gps *store.GPUProviderStore, stk *staking.Staking, wk plugins.IWorker) jrpc2.Handler
- func ListPendingTasks(ts *store.InMemoryTaskStore, gps *store.GPUProviderStore, stk *staking.Staking) jrpc2.Handler
- func NewHealthCheck() jrpc2.Handler
- func NewRewardHandler(gps *store.GPUProviderStore, rewarder *rewards.Rewarder, stk *staking.Staking) jrpc2.Handler
- func OfferTask(ts *store.InMemoryTaskStore, wk plugins.IWorker) jrpc2.Handler
- func OfferTaskHandler(ts *store.InMemoryTaskStore) http.HandlerFunc
- func SubmitTaskResult(store *s.InMemoryTaskStore, logger *log.Entry) jrpc2.Handler
- type HealthCheckResult
- type MinerInfo
- type OfferTaskRequest
- type OfferTaskRequestPayload
- type SubmitTaskResultRequest
- type SubmitTaskResultResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListGPUProviders ¶
func ListPendingTasks ¶
func ListPendingTasks(ts *store.InMemoryTaskStore, gps *store.GPUProviderStore, stk *staking.Staking) jrpc2.Handler
func NewHealthCheck ¶
NewHealthCheck returns a health check json rpc handler
func NewRewardHandler ¶
func OfferTaskHandler ¶
func OfferTaskHandler(ts *store.InMemoryTaskStore) http.HandlerFunc
func SubmitTaskResult ¶
Types ¶
type HealthCheckResult ¶
type HealthCheckResult struct {
Status string `json:"status"`
}
type MinerInfo ¶
type MinerInfo struct { WalletAddress string `json:"walletAddress"` // primary key Votes string `json:"votes"` Platform string `json:"platform"` Python string `json:"python"` Version string `json:"version"` Commit string `json:"commit"` Checksum string `json:"checksum"` OS string `json:"os"` NvidiaGPUModles sdcli.NvidiaGPUModels `json:"nvidia_gpu_models"` CPU sdcli.CPUInfo `json:"CPU"` RAM sdcli.RAMInfo `json:"RAM"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"updatedAt"` IP string `json:"ip"` }
type OfferTaskRequest ¶
type OfferTaskRequest struct { ID string `json:"id"` Payload json.RawMessage `json:"payload"` CoinSymbol plugins.CoinSymbol `json:"coinSymbol"` MaxOfferPrice *big.Int `json:"maxOfferPrice"` }
func (OfferTaskRequest) MarshalJSON ¶
func (o OfferTaskRequest) MarshalJSON() ([]byte, error)
MarshalJSON customizes JSON output for OfferTaskRequest
func (*OfferTaskRequest) UnmarshalJSON ¶
func (o *OfferTaskRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON customizes JSON input for OfferTaskRequest
type OfferTaskRequestPayload ¶
type OfferTaskRequestPayload struct { Method string `json:"Method"` Path string `json:"Path"` Body json.RawMessage `json:"Body"` }
type SubmitTaskResultRequest ¶
type SubmitTaskResultRequest struct { Id string `json:"id"` CoinSymbol plugins.CoinSymbol `json:"coinSymbol"` Status s.TaskStatus `json:"status"` Payload json.RawMessage `json:"payload"` }
func (SubmitTaskResultRequest) MarshalJSON ¶
func (r SubmitTaskResultRequest) MarshalJSON() ([]byte, error)
func (*SubmitTaskResultRequest) UnmarshalJSON ¶
func (r *SubmitTaskResultRequest) UnmarshalJSON(data []byte) error
type SubmitTaskResultResult ¶
type SubmitTaskResultResult struct { }
Click to show internal directories.
Click to hide internal directories.