work

package
v0.0.0-...-b370a20 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunBenchmark

func RunBenchmark(nHashes int, difficultyMultiplier int, gpuOnly bool, devices []opencl.Device)

func WorkToString

func WorkToString(w nanopow.Work) string

Types

type WorkPool

type WorkPool struct {
	Pool *nanopow.Pool
}

func NewWorkPool

func NewWorkPool(gpuOnly bool, devices []opencl.Device) *WorkPool

func (*WorkPool) WorkGenerate

func (p *WorkPool) WorkGenerate(item *serializableModels.ClientMessage) (string, error)

type WorkProcessor

type WorkProcessor struct {
	Queue *models.RandomAccessQueue
	// WorkQueueChan is where we write requests from the websocket
	WorkQueueChan chan *serializableModels.ClientMessage
	WSService     *websocket.WebsocketService
	WorkPool      *WorkPool
	// contains filtered or unexported fields
}

func NewWorkProcessor

func NewWorkProcessor(ws *websocket.WebsocketService, gpuOnly bool, devices []opencl.Device) *WorkProcessor

func (*WorkProcessor) StartAsync

func (wp *WorkProcessor) StartAsync()

Start both workers

func (*WorkProcessor) StartRequestQueueWorker

func (wp *WorkProcessor) StartRequestQueueWorker()

RequestQueueWorker - is a worker that receives work requests directly from the websocket, adds them to the queue, and determines what should be worked on next

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳