mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00

* [NOD-1420] Moved setting limits to executor * [NOD-1420] Moved all code dealing with windows service to separate package * [NOD-1420] Move practically all main to restructured app package * [NOD-1420] Check for running as interactive only after checking if we are doing any service operation * [NOD-1420] Add comments * [NOD-1420] Add a comment
18 lines
652 B
Go
18 lines
652 B
Go
package winservice
|
|
|
|
import "github.com/kaspanet/kaspad/infrastructure/config"
|
|
|
|
// ServiceDescription contains information about a service, needed to administer it
|
|
type ServiceDescription struct {
|
|
Name string
|
|
DisplayName string
|
|
Description string
|
|
}
|
|
|
|
// MainFunc specifies the signature of an application's main function to be able to run as a windows service
|
|
type MainFunc func(startedChan chan<- struct{}) error
|
|
|
|
// WinServiceMain is only invoked on Windows. It detects when kaspad is running
|
|
// as a service and reacts accordingly.
|
|
var WinServiceMain = func(MainFunc, *ServiceDescription, *config.Config) (bool, error) { return false, nil }
|