Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ValidateAddress ¶
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 ¶
AdminConfig configures the local administrative interface.
type AuthConfig ¶
type AuthConfig struct {
BearerTokens BearerTokenConfig `yaml:"bearer_tokens"`
}
AuthConfig configures authentication mechanisms.
type BearerTokenConfig ¶
type BearerTokenConfig struct {
Enabled bool `yaml:"enabled"`
Secret string `yaml:"secret"` // JWT signing secret (or load from env)
}
BearerTokenConfig configures JWT bearer token authentication.
type Config ¶
type Config struct {
HTTP HTTPConfig `yaml:"http"`
Metrics MetricsConfig `yaml:"metrics"`
Auth AuthConfig `yaml:"auth"`
Admin AdminConfig `yaml:"admin"`
PKI PKIConfig `yaml:"pki"`
Scheduler SchedulerConfig `yaml:"scheduler"`
Logging LoggingConfig `yaml:"logging"`
Postgres PostgresConfig `yaml:"postgres"`
GitLab GitLabConfig `yaml:"-"`
ObjectStore ObjectStoreConfig `yaml:"object_store"`
FilePath string `yaml:"-"`
}
Config represents the ployd daemon configuration.
func LoadFromEnv ¶
LoadFromEnv builds server configuration from environment variables.
func (Config) ResolveRelative ¶
ResolveRelative resolves the provided path relative to the configuration location when the path is relative.
type GitLabConfig ¶
GitLabConfig holds env-only GitLab access requisites for server-owned Git operations. It is intentionally not YAML-mapped.
type HTTPConfig ¶
type HTTPConfig struct {
Listen string `yaml:"listen"`
ReadTimeout time.Duration `yaml:"read_timeout"`
WriteTimeout time.Duration `yaml:"write_timeout"`
IdleTimeout time.Duration `yaml:"idle_timeout"`
}
HTTPConfig configures the HTTP server.
type LoggingConfig ¶
type LoggingConfig struct {
Level string `yaml:"level"`
}
LoggingConfig configures logging destinations.
type MetricsConfig ¶
type MetricsConfig struct {
Listen string `yaml:"listen"`
}
MetricsConfig configures the Prometheus metrics endpoint.
type ObjectStoreConfig ¶
type ObjectStoreConfig struct {
Endpoint string `yaml:"endpoint"`
Bucket string `yaml:"bucket"`
AccessKey string `yaml:"access_key"`
SecretKey string `yaml:"secret_key"`
Secure bool `yaml:"secure"`
Region string `yaml:"region,omitempty"`
}
ObjectStoreConfig configures S3-compatible object storage (e.g., Garage).
type PKIConfig ¶
type PKIConfig struct {
BundleDir string `yaml:"bundle_dir"`
Certificate string `yaml:"certificate"`
Key string `yaml:"key"`
RenewBefore time.Duration `yaml:"renew_before"`
CAEndpoint string `yaml:"ca_endpoint"`
}
PKIConfig configures PKI renewal.
type PostgresConfig ¶
type PostgresConfig struct {
DSN string `yaml:"dsn"`
}
PostgresConfig configures PostgreSQL connection.
type SchedulerConfig ¶
type SchedulerConfig struct {
HousekeepingInterval time.Duration `yaml:"housekeeping_interval"`
DiskPruneInterval time.Duration `yaml:"disk_prune_interval"`
// 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 `yaml:"ttl"`
// TTLInterval is how often the TTL worker runs cleanup. Default: 1 hour.
TTLInterval time.Duration `yaml:"ttl_interval"`
// DropPartitions enables dropping entire monthly partitions for expired data
// instead of row-by-row deletion. More efficient for large datasets.
DropPartitions bool `yaml:"drop_partitions"`
// WaveSchedulerInterval is how often the wave scheduler checks for queued runs.
// Set to 0 to disable the wave scheduler. Default: 5 seconds.
WaveSchedulerInterval time.Duration `yaml:"wave_scheduler_interval"`
// StaleJobRecoveryInterval is how often stale Running jobs are recovered.
// Set to 0 to disable stale-job recovery. Default: 30 seconds.
StaleJobRecoveryInterval time.Duration `yaml:"stale_job_recovery_interval"`
// NodeStaleAfter is the heartbeat age threshold after which a node is considered stale.
// Default: 1 minute.
NodeStaleAfter time.Duration `yaml:"node_stale_after"`
}
SchedulerConfig configures background task scheduling.