autoswitch

package
v0.0.0-...-f86c27c Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AlgoShortnames = map[string]string{
	"beamv3":      "eqb",
	"cuckoocycle": "cc",
	"cuckatoo32":  "ct32",
	"etchash":     "etc",
	"ethash":      "eth",
	"kawpow":      "kpw",
	"kheavyhash":  "hh",
	"octopus":     "ops",
	"zelhash":     "zlh",
	"zhash":       "zh",
}

AlgoShortnames used to build the whattomine uri

View Source
var GpuShortnames = map[string]string{
	"amd69xt":   "69xt",
	"amd68xt":   "68xt",
	"amd67xt":   "67xt",
	"amd66xt":   "66xt",
	"vii":       "vii",
	"amd5700xt": "5700xt",
	"amd5700":   "5700",
	"amd5600xt": "5600xt",
	"vega64":    "vega64",
	"vega56":    "vega56",
	"nvi4090":   "4090",
	"nvi4080":   "4080",
	"nvi47Ti":   "47Ti",
	"nvi47":     "47",
	"nvi39Ti":   "39Ti",
	"nvi3090":   "3090",
	"nvi38Ti":   "38Ti",
	"nvi3080":   "3080",
	"nvi37Ti":   "37Ti",
	"nvi3070":   "3070",
}

GpuShortnames used to build the whattomine uri

Functions

This section is empty.

Types

type Algorithm

type Algorithm struct {
	HashRate int `yaml:"hash-rate"`
	Power    int `yaml:"power"`
}

type Config

type Config struct {
	Gpus    map[string]int       `yaml:"gpus"`
	Algos   map[string]Algorithm `yaml:"algos"`
	General General              `yaml:"general"`
}

type General

type General struct {
	PollingFrequency int     `yaml:"polling_frequency"`
	PowerCostPerKwh  float64 `yaml:"power_cost_per_kwh"`
	Threshold        float64 `yaml:"threshold"`
}

type Switcher

type Switcher struct {
	Config *Config
}

func (*Switcher) GetBestAlgo

func (s *Switcher) GetBestAlgo(c context.Context) (string, error)

func (*Switcher) GetURI

func (s *Switcher) GetURI(c context.Context) (string, error)

Jump to

Keyboard shortcuts

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