cmd

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ControlFile configures the main gonit configuration file
	ControlFile string
	// Verbose increases the log verbosity when set to true
	Verbose bool
	// DaemonizeInterval configures the number of seconds between checks when
	// running in loop mode
	DaemonizeInterval int
	// PidFile configures the path to the gonit Pid file
	PidFile string
	// StateFile configures the path to the gonit state database
	StateFile string
	// LogFile configures the path to the gonit log file
	LogFile string
	// Foreground makes the process run the foreground instead of trying to daemonize it
	Foreground bool
	// SocketFile configures the path to the Unix Socket when enabling the HTTP interface
	SocketFile string
)
View Source
var RootCmd = &cobra.Command{
	Use: filepath.Base(os.Args[0]),
	Run: func(cmd *cobra.Command, args []string) {
		RunMonitor(getConfig())
	},
}

RootCmd is the main entry proint to the gonit cli interface

Functions

func RunMonitor

func RunMonitor(c monitor.Config)

RunMonitor executes the monitor code in an infinite loop with the provided configuration

func SetVersionInformation

func SetVersionInformation(v string, date, commitHash string)

SetVersionInformation allows providing the version details to be printed by the version command

Types

This section is empty.

Jump to

Keyboard shortcuts

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