domain

package
v0.0.0-...-36a84b4 Latest Latest
Warning

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

Go to latest
Published: Jul 26, 2024 License: GPL-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlertActionType

type AlertActionType int
const (
	Reboot AlertActionType = iota // 0
	Sleep                         // 1
	Normal                        // 2
)

type AlertConditionType

type AlertConditionType int
const (
	Hashrate          AlertConditionType = iota // 0
	Temperature                                 // 1
	FanSpeed                                    // 2
	PoolShares                                  // 3
	OfflineMiners                               // 4
	MissingHashboards                           // 5
)

type AlertLayerType

type AlertLayerType int
const (
	InfoAlert    AlertLayerType = iota // 0
	WarningAlert                       // 1
	ErrorAlert                         // 2
	FatalAlert                         // 3
)

type AlertMachineCount

type AlertMachineCount int

threshold count (i.e. count as a number of machine, rate)

type AlertState

type AlertState int
const (
	Monitoring AlertState = iota // 0
	Triggered                    // 1
	Resolving                    // 2
	Resolved                     // 3
)

type AlertThresholdType

type AlertThresholdType int

threshold type (i.e. "# of machines: 0 ~ X" or "% of machines: 0 ~ 100" in a fleet) depending on the threshold type below

const (
	Count AlertThresholdType = iota // 0
	Rate                            // 1
)

type AlertTriggerValue

type AlertTriggerValue int

threshold value for alert (i.e. 100 TH/s, 70 degrees Celsius, etc.)

type Config

type Config struct {
	Interval int // in minutes
	Username string
	Password string
}

type Log

type Log string

type MinerType

type MinerType int
const (
	AntminerCgi MinerType = iota // 0

)

type Scanner

type Scanner struct {
	StartIP  string
	EndIP    string
	Active   bool
	Location string
}

TODO: validation TODO: create custom response objects for domain entities

type ScannerController

type ScannerController interface {
	Activate() error
	Deactivate() error
	SetAlert() error
}

Jump to

Keyboard shortcuts

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