daemon

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package daemon provides the background service functionality for scanorama. It manages scheduled discovery and scanning jobs, handles API endpoints, and coordinates the overall operation of the scanning system.

Index

Constants

View Source
const (
	DefaultDirPermissions  = 0o750
	DefaultFilePermissions = 0o600
)

File permission constants.

Variables

This section is empty.

Functions

This section is empty.

Types

type Daemon

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

Daemon represents the main daemon process.

func New

func New(cfg *config.Config) *Daemon

New creates a new daemon instance.

func (*Daemon) GetConfig

func (d *Daemon) GetConfig() *config.Config

GetConfig returns the daemon configuration.

func (*Daemon) GetContext

func (d *Daemon) GetContext() context.Context

GetContext returns the daemon's context.

func (*Daemon) GetDatabase

func (d *Daemon) GetDatabase() *db.DB

GetDatabase returns the database connection.

func (*Daemon) GetPID

func (d *Daemon) GetPID() int

GetPID returns the daemon's PID.

func (*Daemon) IsDebugMode added in v0.9.0

func (d *Daemon) IsDebugMode() bool

IsDebugMode returns the current debug mode state.

func (*Daemon) IsRunning

func (d *Daemon) IsRunning() bool

IsRunning checks if the daemon is running.

func (*Daemon) Start

func (d *Daemon) Start() error

Start starts the daemon.

func (*Daemon) Stop

func (d *Daemon) Stop() error

Stop stops the daemon gracefully.

Jump to

Keyboard shortcuts

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