methods

package
v0.0.0-...-84f0667 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListGPUProviders

func ListGPUProviders(gps *store.GPUProviderStore, stk *staking.Staking, wk plugins.IWorker) jrpc2.Handler

func NewHealthCheck

func NewHealthCheck() jrpc2.Handler

NewHealthCheck returns a health check json rpc handler

func NewRewardHandler

func NewRewardHandler(gps *store.GPUProviderStore, rewarder *rewards.Rewarder, stk *staking.Staking) jrpc2.Handler

func OfferTaskHandler

func OfferTaskHandler(ts *store.InMemoryTaskStore) http.HandlerFunc

func SubmitTaskResult

func SubmitTaskResult(store *s.InMemoryTaskStore, logger *log.Entry) jrpc2.Handler

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 {
}

Jump to

Keyboard shortcuts

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