- Add native Windows service detection and signal handling - Implement configurable shutdown timeout for graceful job completion - Improve HTTP client with connection pooling and timeouts - Propagate context through poller for proper shutdown coordination - Add documentation for Windows service installation (NSSM and sc.exe) - Add *.exe to .gitignore for Windows builds
26 lines
519 B
Go
26 lines
519 B
Go
// Copyright 2024 The Gitea Authors and MarketAlly. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
//go:build !windows
|
|
|
|
package service
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
// IsWindowsService returns false on non-Windows platforms
|
|
func IsWindowsService() bool {
|
|
return false
|
|
}
|
|
|
|
// RunAsService is a no-op on non-Windows platforms
|
|
func RunAsService(serviceName string, run func(ctx context.Context)) error {
|
|
return nil
|
|
}
|
|
|
|
// GetServiceName returns empty on non-Windows platforms
|
|
func GetServiceName() string {
|
|
return ""
|
|
}
|