monitor

package
v0.19.786 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2026 License: AGPL-3.0 Imports: 17 Imported by: 0

README

Monitor

This is a loop that takes stock of the VM resources and watches the runner systemctl for health.

Documentation

Index

Constants

View Source
const (
	ConfigDirectory     = "/opt/nuon/runner"
	ImageConfigFilename = "/opt/nuon/runner/image"
	RunnerTokenFilename = "/opt/nuon/runner/token"
	// systemd
	RunnerServiceDir  = "/etc/systemd/system"
	RunnerServiceName = "nuon-runner.service"
)

NOTE: the process will require ownership of /opt/nuon/runner and its children

Variables

This section is empty.

Functions

func EnsureImageConfigFile

func EnsureImageConfigFile(ctx context.Context, l *zap.Logger, settings *settings.Settings) error

func WriteRunnerTokenFile

func WriteRunnerTokenFile(token string) error

WriteRunnerTokenFile writes the runner token to the token file using the token template

Types

type Monitor

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

func New

func New(params Params) (*Monitor, error)

func (*Monitor) LifecycleHook

func (s *Monitor) LifecycleHook() fx.Hook

func (*Monitor) Start

func (s *Monitor) Start() error

func (*Monitor) Stop

func (s *Monitor) Stop() error

type Params

type Params struct {
	fx.In

	APIClient nuonrunner.Client
	Cfg       *internal.Config
	L         *zap.Logger `name:"system"`
	LC        fx.Lifecycle
	Settings  *settings.Settings
	MW        metrics.Writer
}

Jump to

Keyboard shortcuts

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