config

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package config loads and validates reconD workload configuration.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Workloads []Workload `json:"workloads" yaml:"workloads"`
}

func Load

func Load(path string) (*Config, error)

type Duration

type Duration struct {
	time.Duration
}

func (*Duration) UnmarshalJSON

func (d *Duration) UnmarshalJSON(data []byte) error

func (*Duration) UnmarshalYAML

func (d *Duration) UnmarshalYAML(value *yaml.Node) error

type GitProvider

type GitProvider struct {
	Owner string `json:"owner" yaml:"owner"`
	Repo  string `json:"repo" yaml:"repo"`
	// Token is optional; set via GITHUB_TOKEN env var for private repos.
	Token string `json:"token" yaml:"token"`
}

type HealthCheck

type HealthCheck struct {
	Type     HealthCheckType `json:"type" yaml:"type"`
	URL      string          `json:"url" yaml:"url"`
	Retries  int             `json:"retries" yaml:"retries"`
	Interval Duration        `json:"interval" yaml:"interval"`
	Timeout  Duration        `json:"timeout" yaml:"timeout"`
}

type HealthCheckType

type HealthCheckType string
const (
	HealthCheckNone    HealthCheckType = "none"
	HealthCheckHTTP    HealthCheckType = "http"
	HealthCheckTCP     HealthCheckType = "tcp"
	HealthCheckCommand HealthCheckType = "command"
)

type Strategy

type Strategy struct {
	Type        StrategyType `json:"type" yaml:"type"`
	EnvFilePath string       `json:"env_file_path" yaml:"env_file_path"`
	ImageTagKey string       `json:"image_tag_key" yaml:"image_tag_key"`
}

type StrategyType

type StrategyType string
const (
	StrategyNone    StrategyType = "none"
	StrategyEnvFile StrategyType = "env_file"
)

type Workload

type Workload struct {
	Name            string      `json:"name" yaml:"name"`
	Environment     string      `json:"environment" yaml:"environment"`
	ContainerName   string      `json:"container_name" yaml:"container_name"`
	NotificationURL string      `json:"notification_url" yaml:"notification_url"`
	DeployCommand   string      `json:"deploy_command" yaml:"deploy_command"`
	CheckInterval   Duration    `json:"check_interval" yaml:"check_interval"`
	StateDir        string      `json:"state_dir" yaml:"state_dir"`
	GitProvider     GitProvider `json:"git_provider" yaml:"git_provider"`
	HealthCheck     HealthCheck `json:"health_check" yaml:"health_check"`
	Strategy        Strategy    `json:"strategy" yaml:"strategy"`

	// Labels optionally scope docker image pruning to this workload's images.
	Labels map[string]string `json:"labels" yaml:"labels"`
}

Jump to

Keyboard shortcuts

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