Documentation
¶
Overview ¶
Package app assembles Ripen from its parts and answers the reads. Every surface — CLI, MCP, Web UI — builds the same App, so they cannot answer the same question differently.
Reads need only the policy and the state store. The network clients and credentials live behind Updater, which the read paths never call: that is what lets a read-only surface run without loading a single secret.
Index ¶
- Variables
- func NeedsAttention(report updater.Report) bool
- func ProposedPayload(result updater.Result, runID string) response.Proposed
- func RunPayload(report updater.Report) response.Run
- func Versions() response.Versions
- type App
- func (a *App) Audit(request AuditRequest) (response.Audit, error)
- func (a *App) Candidates() (response.Candidates, error)
- func (a *App) Close() error
- func (a *App) Events(actor domain.Actor, stream io.Writer) (*event.Stream, *notifier.Webhook, error)
- func (a *App) Explain(stack string) (response.Explain, error)
- func (a *App) NotifierHealth(dropped int) (response.NotifierHealth, error)
- func (a *App) Services() []ServiceRef
- func (a *App) Status() (response.Status, error)
- func (a *App) Updater(actor domain.Actor, events updater.EventSink) (*updater.Updater, error)
- type AuditRequest
- type ServiceRef
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidAuditRequest = errors.New("invalid audit request")
ErrInvalidAuditRequest identifies invalid audit pagination parameters.
Functions ¶
func NeedsAttention ¶
NeedsAttention reports whether a run is one a person has to look at: an open breaker or a failed rollback, and nothing else.
func ProposedPayload ¶
ProposedPayload renders a Proposal on the wire.
func RunPayload ¶
RunPayload renders a run report on the wire. Every surface renders it the same way, because they all call this.
Types ¶
type App ¶
App is a loaded policy and an open state store.
func (*App) Audit ¶
func (a *App) Audit(request AuditRequest) (response.Audit, error)
Audit answers `ripen audit` from the attempts table — the record of what Ripen did, never the Event stream.
func (*App) Candidates ¶
func (a *App) Candidates() (response.Candidates, error)
Candidates answers `ripen candidates`: every Candidate under observation, with whether it has matured.
func (*App) Events ¶
func (a *App) Events(actor domain.Actor, stream io.Writer) (*event.Stream, *notifier.Webhook, error)
Events builds the Event stream for one surface: the structured sink, which is always on and writes every Event, plus the webhook Notifier when the policy configures one. The returned Webhook is nil when no Notifier is configured; close it to drain what is queued.
func (*App) Explain ¶
Explain answers `ripen explain <stack>`: what the next run would do with this stack, and what is standing in the way. It reads policy and state only — no backend, no registry, no network.
func (*App) NotifierHealth ¶
func (a *App) NotifierHealth(dropped int) (response.NotifierHealth, error)
NotifierHealth reports what is durable about Notifier delivery, plus this process's in-memory drop count.
func (*App) Services ¶
func (a *App) Services() []ServiceRef
Services enumerates every configured Service in policy order.
type AuditRequest ¶ added in v1.2.0
type AuditRequest struct {
Limit string
Cursor string
RunID string
Backend string
Stack string
Service string
Result string
}
AuditRequest selects and pages recorded attempts using transport input values. Empty pagination values select the newest 50 attempts.
type ServiceRef ¶
type ServiceRef struct {
Key state.Key
Stack config.StackPolicy
Enabled bool
AutoApply bool
Health config.HealthPolicy
}
ServiceRef is one Service the policy declares: the state Key it is recorded under, plus the rules that apply to it. Reads are driven by this list, not by what the state store happens to contain, so a configured-but-never-observed Service still appears.