Documentation
¶
Index ¶
- func Executable() (string, error)
- func ExecutableFolder() (string, error)
- type Service
- func (svr *Service) Execute(args ...string) (err error)
- func (svr *Service) IsBroker() bool
- func (svr *Service) IsConsole() bool
- func (svr *Service) IsService() bool
- func (svr *Service) ServiceDescription() string
- func (svr *Service) ServiceDisplayName() string
- func (svr *Service) ServiceExeFolder() string
- func (svr *Service) ServiceExeName() string
- func (svr *Service) ServiceName() string
- func (svr *Service) Start(s service.Service) error
- func (svr *Service) Stop(s service.Service) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Executable ¶
Executable returns an absolute path that can be used to re-invoke the current program. It may not be valid after the current program exits.
func ExecutableFolder ¶
Returns same path as Executable, returns just the folder path. Excludes the executable name and any trailing slash.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service struct
func NewService ¶
func NewService(name string, displayName string, description string, start func(*Service, ...string), run func(*Service, ...string), stop func(*Service, ...string)) (svr *Service, err error)
NewService invoke new *Service name - ServiceName displayName - ServiceDisplayName description - ServiceDescription start - func(*Service, ...string) implementation, gets invoked when Service Start run - func(*Service, ...string) implementation, gets invoked when Service Run stop - func(*Service, ...string) implementation, gets invoked when Service Stop
func (*Service) Execute ¶
Execute main Service Execute method when executing Service called in main() func of golang app, args - args from os gets passed into here
func (*Service) ServiceDescription ¶
ServiceDescription Service Description
func (*Service) ServiceDisplayName ¶
ServiceDisplayName Service Display Name
func (*Service) ServiceExeFolder ¶
ServiceExeFolder local folder where Service Executable resides
func (*Service) ServiceExeName ¶
ServiceExeName Service Executable Name