daemon

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRunning

func IsRunning(path string) (int, bool)

IsRunning checks if a daemon process is alive using the PID file.

func ReadPID

func ReadPID(path string) (int, error)

ReadPID reads the process ID from the given path.

func RemovePID

func RemovePID(path string) error

RemovePID removes the PID file.

func WritePID

func WritePID(path string) error

WritePID writes the current process ID to the given path.

Types

type Daemon

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

Daemon is the long-running background process that manages email connections, caching, sync, and notifications.

func New

func New(cfg *config.Config) *Daemon

New creates a daemon with the given config.

func (*Daemon) ReloadConfig

func (d *Daemon) ReloadConfig() error

ReloadConfig reloads the configuration from disk.

func (*Daemon) Run

func (d *Daemon) Run() error

Run starts the daemon: creates providers, starts the socket listener, starts background sync, and blocks until shutdown.

func (*Daemon) Shutdown

func (d *Daemon) Shutdown()

Shutdown triggers a graceful shutdown.

Jump to

Keyboard shortcuts

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