Documentation
¶
Index ¶
- func SpawnDaemon(cfg *config.Instance) (cleanup func(), err error)
- type Service
- func (s *Service) Pid() (int, error)
- func (s *Service) Restart() error
- func (s *Service) Running() bool
- func (s *Service) ServiceHandler(cmd *string) error
- func (s *Service) Start() error
- func (s *Service) Stop() error
- func (s *Service) WaitForAPI(cfg *config.Instance, maxWait, checkInterval time.Duration) error
- type ServiceArgs
- type ServiceEntry
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SpawnDaemon ¶
SpawnDaemon spawns a daemon subprocess for service isolation (e.g., TUI mode). It waits for the service API to become available and returns a cleanup function. The cleanup function sends SIGTERM and waits for graceful shutdown with timeout. Returns a no-op cleanup function if service was already running.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(args ServiceArgs) (*Service, error)
func (*Service) ServiceHandler ¶
type ServiceArgs ¶
type ServiceArgs struct {
Platform platforms.Platform
Entry ServiceEntry
NoDaemon bool
}
type ServiceEntry ¶
Click to show internal directories.
Click to hide internal directories.