config

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPollInterval     = 1 * time.Minute
	DefaultReconcileTimeout = 2 * time.Minute
)

Variables

This section is empty.

Functions

func GetPollInterval added in v0.0.8

func GetPollInterval() time.Duration

GetPollInterval returns the watcher poll interval from MD_POLL_INTERVAL env var. Expects a duration string like "30s", "2m", "1h". Defaults to 1 minute.

func GetReconcileTimeout added in v0.0.8

func GetReconcileTimeout() time.Duration

GetReconcileTimeout returns the reconcile script timeout from MD_RECONCILE_TIMEOUT env var. Expects a duration string like "30s", "5m". Defaults to 2 minutes.

func LoadEnv added in v0.0.8

func LoadEnv() error

LoadEnv loads .env file if it exists. It's safe to call multiple times. Returns nil if .env doesn't exist (allows env vars to be set externally).

Types

type Config

type Config struct {
	RepoURL        string
	PreferDigest   bool
	PreferPR       bool
	AppId          int64
	InstallationId int64
	PrivateKeyPath string
}

func GetGitPreferences

func GetGitPreferences() (*Config, error)

func GetGithubConfig

func GetGithubConfig() (*Config, error)

Jump to

Keyboard shortcuts

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