config

package
v0.1.18-rc16 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateAddress

func ValidateAddress(s string) (netip.AddrPort, error)

ValidateAddress parses and validates a TCP listen address of the form "host:port", "ip:port", "[ipv6]:port" or ":port". It accepts port 0 (ephemeral port). When the host component is empty (e.g. ":8443"), the returned address uses the unspecified IPv6 address ("::").

Types

type AdminConfig

type AdminConfig struct {
	Socket string
	Listen string
}

AdminConfig configures the local administrative interface.

type AuthConfig

type AuthConfig struct {
	BearerTokens BearerTokenConfig
}

AuthConfig configures authentication mechanisms.

type BearerTokenConfig

type BearerTokenConfig struct {
	Enabled bool
	Secret  string
}

BearerTokenConfig configures JWT bearer token authentication.

type Config

type Config struct {
	HTTP                  HTTPConfig
	Metrics               MetricsConfig
	Auth                  AuthConfig
	Admin                 AdminConfig
	PKI                   PKIConfig
	Scheduler             SchedulerConfig
	Logging               LoggingConfig
	Postgres              PostgresConfig
	GitLab                GitLabConfig
	SpecRepos             SpecRepos
	NamedSpecEnvAllowlist NamedSpecEnvAllowlist
	ObjectStore           ObjectStoreConfig
}

Config represents the ployd daemon configuration.

func LoadFromEnv

func LoadFromEnv() (Config, error)

LoadFromEnv builds server configuration from environment variables.

type GitLabConfig

type GitLabConfig struct {
	Domain string
	Token  string
}

GitLabConfig holds GitLab access requisites for server-owned Git operations.

type HTTPConfig

type HTTPConfig struct {
	Listen       string
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
	IdleTimeout  time.Duration
}

HTTPConfig configures the HTTP server.

type LoggingConfig

type LoggingConfig struct {
	Level string
}

LoggingConfig configures logging destinations.

type MetricsConfig

type MetricsConfig struct {
	Listen string
}

MetricsConfig configures the Prometheus metrics endpoint.

type NamedSpecEnvAllowlist

type NamedSpecEnvAllowlist []string

NamedSpecEnvAllowlist contains process environment names available during named-spec compilation.

type ObjectStoreConfig

type ObjectStoreConfig struct {
	Endpoint  string
	Bucket    string
	AccessKey string
	SecretKey string
	Secure    bool
	Region    string
}

ObjectStoreConfig configures S3-compatible object storage (e.g., Garage).

type PKIConfig

type PKIConfig struct {
	BundleDir   string
	Certificate string
	Key         string
	RenewBefore time.Duration
	CAEndpoint  string
}

PKIConfig configures PKI renewal.

type PostgresConfig

type PostgresConfig struct {
	DSN string
}

PostgresConfig configures PostgreSQL connection.

type SchedulerConfig

type SchedulerConfig struct {
	HousekeepingInterval time.Duration
	DiskPruneInterval    time.Duration
	// TTL is the retention period for logs, events, diffs, and artifact bundles.
	// Data older than this will be purged by the TTL worker. Default: 30 days.
	TTL time.Duration
	// TTLInterval is how often the TTL worker runs cleanup. Default: 1 hour.
	TTLInterval time.Duration
	// DropPartitions enables dropping entire monthly partitions for expired data
	// instead of row-by-row deletion. More efficient for large datasets.
	DropPartitions bool
	// StaleJobRecoveryInterval is how often stale Running jobs are recovered.
	// Set to 0 to disable stale-job recovery. Default: 30 seconds.
	StaleJobRecoveryInterval time.Duration
	// NodeStaleAfter is the heartbeat age threshold after which a node is considered stale.
	// Default: 1 minute.
	NodeStaleAfter time.Duration
}

SchedulerConfig configures background task scheduling.

type SpecRepos

type SpecRepos []domaintypes.RepoURL

SpecRepos contains the startup-only Git repositories used for named-spec discovery.

Jump to

Keyboard shortcuts

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