service

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package service provides cross-platform service management for roji.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LaunchdOptions

type LaunchdOptions struct {
	User string
}

LaunchdOptions for non-macOS platforms (stub)

type Manager

type Manager interface {
	// Install registers roji as a system service
	Install() error

	// Uninstall removes roji from system services
	Uninstall() error

	// Start starts the roji service
	Start() error

	// Stop stops the roji service
	Stop() error

	// Restart restarts the roji service
	Restart() error

	// Status returns the current service status
	Status() (*Status, error)

	// IsInstalled checks if the service is installed
	IsInstalled() bool
}

Manager provides service management operations

func NewManager

func NewManager() (Manager, error)

NewManager returns a platform-specific service manager

func NewManagerWithOptions

func NewManagerWithOptions(opts Options) (Manager, error)

NewManagerWithOptions returns a platform-specific service manager with options

type Options

type Options struct {
	User string // User to run service as (Linux only)
}

Options for creating a service manager

type ServiceOptions

type ServiceOptions struct {
	User string // User to run service as (empty = auto-detect)
}

ServiceOptions contains options for service installation

type Status

type Status struct {
	Installed   bool
	Running     bool
	Enabled     bool   // Auto-start on boot
	Description string // Human-readable status
}

Status represents the service status

type WindowsOptions

type WindowsOptions struct {
	User string
}

WindowsOptions for non-Windows platforms (stub)

Jump to

Keyboard shortcuts

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