service

package
v1.7.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package service manages the background process for the ASK web server.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager handles service process management

func NewManager

func NewManager(homeDir string) *Manager

NewManager creates a new service manager

func (*Manager) ClearPID

func (m *Manager) ClearPID() error

ClearPID removes the PID file

func (*Manager) GetLogFilePath

func (m *Manager) GetLogFilePath() string

GetLogFilePath returns the path to the log file

func (*Manager) GetPIDFilePath

func (m *Manager) GetPIDFilePath() string

GetPIDFilePath returns the path to the PID file

func (*Manager) GetStatus

func (m *Manager) GetStatus() (int, bool, error)

GetStatus returns the status of the service (pid, running, error)

func (*Manager) IsRunning

func (m *Manager) IsRunning(pid int) bool

IsRunning checks if the process with the given PID is running

func (*Manager) ReadPID

func (m *Manager) ReadPID() (int, error)

ReadPID reads the PID from the PID file

func (*Manager) WritePID

func (m *Manager) WritePID(pid int) error

WritePID writes the current process ID to the PID file

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL