service

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MaybeRunWindowsService

func MaybeRunWindowsService(name string, log *zap.Logger) (bool, error)

MaybeRunWindowsService runs the process in service-manager mode when applicable. Returns handled=true when the process was started by service manager.

func WindowsServiceLogFile

func WindowsServiceLogFile(name string) string

WindowsServiceLogFile is a no-op placeholder on non-Windows platforms.

Types

type Mode

type Mode string

Mode describes how the current process is running.

const (
	ModeCLI    Mode = "cli"
	ModeDaemon Mode = "daemon"
)

func RuntimeMode

func RuntimeMode() (Mode, error)

RuntimeMode reports whether process is running under a service manager.

Jump to

Keyboard shortcuts

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