//go:build !windows // Package service provides the non-Windows stubs for the Windows service // integration. Run falls back to plain signal handling; install/remove // are unsupported. package service import ( "context" "errors" "os/signal" "syscall" ) // Name matches the Windows service name. const Name = "gpu-turnstile" var errUnsupported = errors.New("service management is only supported on Windows") // IsService is always false on non-Windows platforms. func IsService() bool { return false } // Run executes run with SIGINT/SIGTERM cancellation, mirroring the // interactive behavior. func Run(run func(ctx context.Context) error) error { ctx, stop := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM) defer stop() return run(ctx) } // Install is unsupported on non-Windows platforms. func Install(string) error { return errUnsupported } // Remove is unsupported on non-Windows platforms. func Remove() error { return errUnsupported }