launchd

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label is the launchd service identifier
	Label = "com.github.dastrobu.mail-mcp"

	// PlistFilename is the name of the plist file
	PlistFilename = Label + ".plist"

	// DefaultPort is the default HTTP port
	DefaultPort = 8787

	// DefaultHost is the default HTTP host
	DefaultHost = "localhost"

	// DefaultLogPath is the default log file path
	DefaultLogPath = "~/Library/Logs/com.github.dastrobu.mail-mcp/mail-mcp.log"

	// DefaultErrPath is the default error file path
	DefaultErrPath = "~/Library/Logs/com.github.dastrobu.mail-mcp/mail-mcp.err"
)

Variables

This section is empty.

Functions

func Create

func Create(cfg *Config) error

Create performs the complete launchd service creation

func IsLoaded

func IsLoaded() bool

IsLoaded checks if the service is currently loaded

func PlistPath

func PlistPath() string

PlistPath returns the full path to the plist file

func Remove

func Remove() error

Remove removes the launchd service

func Restart

func Restart() error

Restart uses 'launchctl kickstart' to stop and start the launchd service without modifying the existing plist file. This is the recommended, atomic way to restart a service while respecting any manual user configuration.

Types

type Config

type Config struct {
	BinaryPath string
	Host       string
	Port       int
	LogPath    string
	ErrPath    string
	Debug      bool
	RunAtLoad  bool
}

Config holds the launchd service configuration

func DefaultConfig

func DefaultConfig() (*Config, error)

DefaultConfig returns the default launchd configuration

Jump to

Keyboard shortcuts

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