miners

package
v0.0.0-...-7c1506c Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2023 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BinaryArguments

type BinaryArguments struct {
	StratumUrl       string
	StratumUsername  string
	StratumPassword  string
	EnableIntegrated bool
}

type BinaryRunner

type BinaryRunner struct {
	MinerBinary MinerBinary
	MinerImpl   MinerImpl

	Debug bool
	// contains filtered or unexported fields
}

func NewBinaryRunner

func NewBinaryRunner(m MinerBinary, prerequisiteInstall chan bool) (*BinaryRunner, error)

func (*BinaryRunner) CheckRunning

func (b *BinaryRunner) CheckRunning() RunningState

func (*BinaryRunner) HashRate

func (b *BinaryRunner) HashRate() uint64

func (*BinaryRunner) Install

func (b *BinaryRunner) Install() error

func (*BinaryRunner) IsRunning

func (b *BinaryRunner) IsRunning() bool

func (*BinaryRunner) Start

func (b *BinaryRunner) Start(args BinaryArguments) error

func (*BinaryRunner) Stop

func (b *BinaryRunner) Stop() error

func (*BinaryRunner) WaitUntilStopped

func (b *BinaryRunner) WaitUntilStopped()

type CCMinerImpl

type CCMinerImpl struct {
	// contains filtered or unexported fields
}

func (*CCMinerImpl) AvailableGPUs

func (l *CCMinerImpl) AvailableGPUs() int8

func (*CCMinerImpl) Configure

func (l *CCMinerImpl) Configure(args BinaryArguments) error

func (*CCMinerImpl) ConstructCommandlineArgs

func (l *CCMinerImpl) ConstructCommandlineArgs(args BinaryArguments) []string

func (*CCMinerImpl) HashRate

func (l *CCMinerImpl) HashRate() uint64

func (*CCMinerImpl) ParseOutput

func (l *CCMinerImpl) ParseOutput(line string)

type CryptoDredgeMinerImpl

type CryptoDredgeMinerImpl struct {
	// contains filtered or unexported fields
}

func (*CryptoDredgeMinerImpl) AvailableGPUs

func (l *CryptoDredgeMinerImpl) AvailableGPUs() int8

func (*CryptoDredgeMinerImpl) Configure

func (l *CryptoDredgeMinerImpl) Configure(args BinaryArguments) error

func (*CryptoDredgeMinerImpl) ConstructCommandlineArgs

func (l *CryptoDredgeMinerImpl) ConstructCommandlineArgs(args BinaryArguments) []string

func (*CryptoDredgeMinerImpl) HashRate

func (l *CryptoDredgeMinerImpl) HashRate() uint64

func (*CryptoDredgeMinerImpl) ParseOutput

func (l *CryptoDredgeMinerImpl) ParseOutput(line string)

type LyclMinerImpl

type LyclMinerImpl struct {
	// contains filtered or unexported fields
}

func (*LyclMinerImpl) AvailableGPUs

func (l *LyclMinerImpl) AvailableGPUs() int8

func (*LyclMinerImpl) Configure

func (l *LyclMinerImpl) Configure(args BinaryArguments) error

func (*LyclMinerImpl) ConstructCommandlineArgs

func (l *LyclMinerImpl) ConstructCommandlineArgs(args BinaryArguments) []string

func (*LyclMinerImpl) HashRate

func (l *LyclMinerImpl) HashRate() uint64

func (*LyclMinerImpl) ParseOutput

func (l *LyclMinerImpl) ParseOutput(line string)

type MinerBinary

type MinerBinary struct {
	Platform           string   `json:"platform"`
	GpuPlatformString  string   `json:"gpuplatform"`
	Url                string   `json:"url"`
	Prerequisites      []string `json:"minerPreRequisites"`
	Hash               string   `json:"sha256"`
	MainExecutableName string   `json:"mainExecutableName"`
	ClosedSource       bool     `json:"closedSource"`
	Testnet            bool     `json:"testnet"`
	MultiGPUMiner      bool     `json:"multiGPUMiner"`
	EnableIntegrated   bool     `json:"enableIntegrated"`
	GPUType            util.GPUType
}

func GetMinerBinaries

func GetMinerBinaries() []MinerBinary

type MinerImpl

type MinerImpl interface {
	ParseOutput(line string)
	Configure(args BinaryArguments) error
	HashRate() uint64
	ConstructCommandlineArgs(args BinaryArguments) []string
	AvailableGPUs() int8
}

func NewCCMinerImpl

func NewCCMinerImpl(br *BinaryRunner) MinerImpl

func NewCryptoDredgeMinerImpl

func NewCryptoDredgeMinerImpl(br *BinaryRunner) MinerImpl

func NewLyclMinerImpl

func NewLyclMinerImpl(br *BinaryRunner) MinerImpl

func NewTeamRedMinerImpl

func NewTeamRedMinerImpl(br *BinaryRunner) MinerImpl

func NewVerthashMinerImpl

func NewVerthashMinerImpl(br *BinaryRunner) MinerImpl

type RunningState

type RunningState int
const (
	RunningStateRunning    RunningState = 0
	RunningStateRestarting RunningState = 1
	RunningStateRapidFail  RunningState = 2
)

type TeamRedMinerImpl

type TeamRedMinerImpl struct {
	// contains filtered or unexported fields
}

func (*TeamRedMinerImpl) AvailableGPUs

func (l *TeamRedMinerImpl) AvailableGPUs() int8

func (*TeamRedMinerImpl) Configure

func (l *TeamRedMinerImpl) Configure(args BinaryArguments) error

func (*TeamRedMinerImpl) ConstructCommandlineArgs

func (l *TeamRedMinerImpl) ConstructCommandlineArgs(args BinaryArguments) []string

func (*TeamRedMinerImpl) HashRate

func (l *TeamRedMinerImpl) HashRate() uint64

func (*TeamRedMinerImpl) ParseOutput

func (l *TeamRedMinerImpl) ParseOutput(line string)

type VerthashMinerImpl

type VerthashMinerImpl struct {
	// contains filtered or unexported fields
}

func (*VerthashMinerImpl) AvailableGPUs

func (l *VerthashMinerImpl) AvailableGPUs() int8

func (*VerthashMinerImpl) Configure

func (l *VerthashMinerImpl) Configure(args BinaryArguments) error

func (*VerthashMinerImpl) ConstructCommandlineArgs

func (l *VerthashMinerImpl) ConstructCommandlineArgs(args BinaryArguments) []string

func (*VerthashMinerImpl) HashRate

func (l *VerthashMinerImpl) HashRate() uint64

func (*VerthashMinerImpl) ParseOutput

func (l *VerthashMinerImpl) ParseOutput(line string)

Jump to

Keyboard shortcuts

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