Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Change ¶
type Change struct {
Key string
Action Action
LiveValue string // current value in Railway (empty for Create)
DesiredValue string // desired value from config (empty for Delete)
}
Change represents a single variable or setting change.
type Options ¶ added in v0.2.0
type Options struct {
Create bool // include creates (default true)
Update bool // include updates (default true)
Delete bool // include deletes (default false)
}
Options controls which change types are included in the diff.
func DefaultOptions ¶ added in v0.2.0
func DefaultOptions() Options
DefaultOptions returns the default diff options.
type Result ¶
type Result struct {
Services map[string]*SectionDiff // keyed by service name
}
Result holds the complete diff between desired config and live state.
func Compute ¶
func Compute(desired *config.DesiredConfig, live *config.LiveConfig) *Result
Compute calculates the diff between desired and live config. It uses DefaultOptions (create+update, no delete).
func ComputeWithOptions ¶ added in v0.2.0
func ComputeWithOptions(desired *config.DesiredConfig, live *config.LiveConfig, opts Options) *Result
ComputeWithOptions calculates the diff between desired and live config, filtering changes by the provided options.
type SectionDiff ¶
type SectionDiff struct {
Variables []Change
Settings []Change
SubResources []SubResourceChange
}
SectionDiff holds diffs for one scope (shared or a service).
type SubResourceChange ¶ added in v0.2.0
type SubResourceChange struct {
Type string // "domain", "volume", "tcp_proxy", "network", "trigger", "egress"
Action Action
Key string // human-readable key (domain name, mount path, port, etc.)
LiveID string // ID for deletes
Port int // for domains/TCP proxies
Mount string // for volumes
Repo string // for triggers
Branch string // for triggers
Regions []string // for egress (set semantics)
IsCustom bool // for domains: true = custom, false = service domain
}
SubResourceChange represents a create or delete for a sub-resource (domain, volume, TCP proxy, network, trigger, egress).
Click to show internal directories.
Click to hide internal directories.