daemon

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRunning

func IsRunning() bool

IsRunning checks if the daemon is running

func PIDPath

func PIDPath() string

PIDPath returns the path to the daemon PID file

func SendCommand

func SendCommand(command string) ([]byte, error)

SendCommand sends a command to the daemon

func SocketPath

func SocketPath() string

SocketPath returns the path to the daemon socket

func StatusPath

func StatusPath() string

StatusPath returns the path to the daemon status file

Types

type Daemon

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

Daemon manages background update checks

func New

func New(cfg *config.Config) *Daemon

New creates a new daemon

func (*Daemon) Start

func (d *Daemon) Start(ctx context.Context) error

Start starts the daemon

func (*Daemon) Stop

func (d *Daemon) Stop() error

Stop stops the daemon

type Status

type Status struct {
	Running          bool      `json:"running"`
	PID              int       `json:"pid"`
	StartedAt        time.Time `json:"startedAt,omitempty"`
	LastCheck        time.Time `json:"lastCheck,omitempty"`
	CheckCount       int       `json:"checkCount"`
	UpdatesAvailable []string  `json:"updatesAvailable,omitempty"`
}

Status represents the daemon status

func GetStatus

func GetStatus() (*Status, error)

GetStatus gets the daemon status

Jump to

Keyboard shortcuts

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