controller

package
v0.0.0-...-f7edce5 Latest Latest
Warning

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

Go to latest
Published: May 21, 2018 License: MIT Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ConfigPoolsModule = fx.Provide(
	NewPutPoolsCtrl,
	NewGetPoolsCtrl,
)

Functions

This section is empty.

Types

type BAMStatus

type BAMStatus struct {
	Status  string
	Error   error
	Message string
}

type Controller

type Controller struct {
	Methods []string
	Path    string
	Handler http.Handler
}

type Data

type Data struct {
	Controllers []*Controller
	MatchFunc   func(methods []string, path string, handler echo.HandlerFunc, middleware ...echo.MiddlewareFunc) []*echo.Route
}

func (*Data) Match

func (d *Data) Match()

type Group

type Group struct {
	fx.In
	Controllers []*Controller `group:"controller"`
}

type Manager

type Manager interface {
	Match()
}

func NewManager

func NewManager(e *echo.Echo, g Group) Manager

There is a little fx magic here. Group gets magically populated with a list of controllers because those are provided in the module declaration below and we use the fx 'group' functionality to make that happen.

type RebootConfig

type RebootConfig struct {
	Delay time.Duration
}

type Result

type Result struct {
	fx.Out
	Controller *Controller `group:"controller"`
}

func NewCGQuitGetCtrl

func NewCGQuitGetCtrl() Result

func NewCGQuitPostCtrl

func NewCGQuitPostCtrl(mgr monitor.Manager, client miner.Client) Result

func NewCGRestartGetCtrl

func NewCGRestartGetCtrl(mgr monitor.Manager, client miner.Client) Result

func NewCGRestartPostCtrl

func NewCGRestartPostCtrl(mgr monitor.Manager, client miner.Client) Result

func NewCGStartGetCtrl

func NewCGStartGetCtrl() Result

func NewCGStartPostCtrl

func NewCGStartPostCtrl(mgr monitor.Manager, miner os.Miner) Result

func NewCgMinerExporterCtrl

func NewCgMinerExporterCtrl(client cgminer_client.Client, version miner.Version) Result

func NewConfigDHCPCtrl

func NewConfigDHCPCtrl(mgr monitor.Manager, networking os.Networking, cfgNet cgminer.ConfigNetwork) Result

func NewConfigFrequencyCtrl

func NewConfigFrequencyCtrl(mgr monitor.Manager, cfgFreq cgminer.ConfigFrequency, client miner.Client) Result

func NewConfigIPCtrl

func NewConfigIPCtrl(mgr monitor.Manager, networking os.Networking, cfgNet cgminer.ConfigNetwork) Result

func NewGetPoolsCtrl

func NewGetPoolsCtrl(poolCfg cgminer.ConfigPools) Result

func NewNodeExporterCtrl

func NewNodeExporterCtrl() Result

func NewNtpdateGetCtrl

func NewNtpdateGetCtrl() Result

func NewNtpdatePostCtrl

func NewNtpdatePostCtrl(ntpdate os.Ntpdate) Result

func NewPutLocationCtrl

func NewPutLocationCtrl(mgr monitor.Manager, location agent.ConfigLocation) Result

func NewPutPoolsCtrl

func NewPutPoolsCtrl(mgr monitor.Manager, poolCfg cgminer.ConfigPools, client miner.Client) Result

func NewRebootForceGetCtrl

func NewRebootForceGetCtrl() Result

func NewRebootForcePostCtrl

func NewRebootForcePostCtrl(reboot os.Reboot) Result

func NewRebootGetCtrl

func NewRebootGetCtrl() Result

func NewRebootPostCtrl

func NewRebootPostCtrl(cfg RebootConfig, reboot os.Reboot) Result

func NewStatusCtrl

func NewStatusCtrl(agentVersion agent.Version, minerVersion miner.Version, getUptimeResult os.UptimeResultFunc, netInfo os.NetInfo, location agent.ConfigLocation) Result

func NewUpdateCtrl

func NewUpdateCtrl() Result

type StatusResponse

type StatusResponse struct {
	Agent    *string              `json:"agent"`
	Miner    *string              `json:"miner"`
	Uptime   time.Duration        `json:"uptime"`
	Date     time.Time            `json:"date"`
	Mac      *string              `json:"mac"`
	Location agent.LocationConfig `json:"location"`
}

Jump to

Keyboard shortcuts

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