config

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package config loads PullPilot's daemon-wide configuration from PP_* env vars.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataDirPersistent

func DataDirPersistent(dir string) (persistent bool, determinable bool)

DataDirPersistent reports whether dir appears to be a real mount (bind/volume) rather than the container's ephemeral layer. The second return is false when it cannot be determined (e.g. /proc is unavailable, as on non-Linux dev hosts).

Types

type Config

type Config struct {
	Schedule         string
	Timezone         string
	Jitter           time.Duration
	Scope            Scope
	Soak             time.Duration
	SelfUpdate       bool
	Cleanup          bool
	Webhook          bool
	WebhookURL       string
	DataDir          string
	NotifyURL        string
	DryRun           bool
	LogLevel         string
	LogJSON          bool
	CompatWatchtower bool

	// Warnings collects non-fatal config problems (e.g. an unparseable value
	// that fell back to a default), surfaced in the boot summary.
	Warnings []string
}

Config is the resolved daemon configuration.

func Load

func Load() (*Config, error)

Load reads configuration from the environment, applying defaults.

func (*Config) Location

func (c *Config) Location() *time.Location

Location returns the configured time.Location (validated in Load).

func (*Config) LogSummary

func (c *Config) LogSummary(log zerolog.Logger)

LogSummary emits a single redacted boot summary event. Secrets are never logged.

type Scope

type Scope struct {
	Mode    string // "project" | "all"
	Project string // explicit project name for "project:<name>"
}

Scope selects which containers PullPilot manages.

Jump to

Keyboard shortcuts

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