pool

package module
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: MIT Imports: 3 Imported by: 5

README

openpool-plugin

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PluginInterface

type PluginInterface interface {
	Init(cfg config.Config, store StorageInterface)
	Start()
}

PluginInterface defines the methods all plugins must implement.

type StorageInterface

type StorageInterface interface {
	Init(config *config.Config)
	GetLastEventTimestamp() (time.Time, error)
	AddEvent(event models.PoolEvent) error
	GetWorkers() ([]models.Worker, error)
	GetPreferredWorkers(criteria models.PreferredWorkerCriteria) ([]models.Worker, error)
	AddPaidFees(ethAddress string, amount int64, txhash string, region string, nodeType string) error //wei values
	UpdateWorkerStatus(ethAddress string, online bool, region string, nodeType string) error
	AddPendingFees(ethAddress string, amount int64, region string, nodeType string) error //wei values
	ResetWorkersOnlineStatus(region string, nodeType string) error
	GetPendingFees() (float64, error) //eth value
	GetPaidFees() (float64, error)    //eth value
}

StorageInterface defines the methods a storage plugin must implement.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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