Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultRetryStrategy = &RetryStrategy{ Initial: time.Second, MaxRetries: 9999, MaxDuration: 60 * time.Second, MaxJitter: time.Second, }
View Source
var ErrNotWindowsService = errors.New("process not started as Windows service")
Functions ¶
This section is empty.
Types ¶
type RetryStrategy ¶ added in v1.1.0
type RetryStrategy struct { Initial time.Duration MaxRetries uint MaxDuration time.Duration MaxJitter time.Duration }
func (*RetryStrategy) Retry ¶ added in v1.1.0
func (s *RetryStrategy) Retry(f func() error) error
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service implements svc.Service
type ServiceConfig ¶
ServiceConfig holds information to create a Windows service
func (*ServiceConfig) Install ¶
func (s *ServiceConfig) Install() error
Install installs the service executable, creates the Windows service, and starts it
func (*ServiceConfig) Service ¶
func (s *ServiceConfig) Service(main func(w io.Writer) error) *Service
Service returns a new Service for use with svc.Run
func (*ServiceConfig) Uninstall ¶
func (s *ServiceConfig) Uninstall() error
Uninstall uninstalls the service
Click to show internal directories.
Click to hide internal directories.