Help us shape the future of Go! Take the 2026 Go Developer Survey

httpstore

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

README

pkg/controller/httpstore

Event adapter around pkg/httpstore.HTTPStore plus the template-callable HTTPStoreWrapper that exposes http.Fetch() to Scriggo templates.

Overview

Templates can pull external content via {% var blocklist = http.Fetch("https://example.com/list.txt", {"interval": "5m"}) %}. The pure store in pkg/httpstore handles fetching, caching, and the two-version pending/accepted lifecycle without knowing about the controller's event bus. This package is the event adapter that wraps the pure store with:

  • A refresh timer per registered URL (driven by interval in the http.Fetch options).
  • Source reconciliation on authoritative live-render calls, so credential changes refetch and interval changes replace or stop the timer.
  • A render-local input transaction for cold or replaced sources. It memoizes each source for the render and accepts the complete candidate set only after the exact output passes the full pipeline.
  • Proposal-validation handling: the component validates one immutable pending-content batch at a time. A matching completion finalizes only the URL versions in that batch; content refreshed during validation is queued in the next batch.
  • Periodic eviction of cache entries that templates haven't touched recently (evictionMaxAge, typically 2 × dataplane.driftPreventionInterval).
  • Publishing HTTPResourceUpdatedEvent / HTTPResourceAcceptedEvent for accepted-state observability. Rejections are logged directly with the validation error, URL, and rejected and retained checksums.

The HTTPStoreWrapper is the template-side view: it implements the methods Scriggo calls into (Fetch, Status) and bridges them to the underlying component. An authoritative wrapper owns one input transaction. The renderer hands that transaction to the pipeline, which aborts it on any render, validation, cancellation, or commit-fence failure and commits it only after built-in and configured output validation succeed.

One wrapper represents one render and accepts only one authentication and option set per URL. Live reconciliation wrappers are authoritative: a later live render may replace a declaration, and cache and timer generations fence work from the retired declaration. A cold or replaced response remains outside shared accepted and pending state until the exact complete pipeline commits every candidate atomically. Validation and source-map wrappers are read-only. They reuse matching overlay or accepted bytes and fetch other declarations into a store owned by that render.

Quick Start

import "github.com/haproxy-haptic/HAPTIC/pkg/controller/httpstore"

evictionMaxAge := 2 * cfg.Dataplane.GetDriftPreventionInterval()
hsComponent := httpstore.New(eventBus, logger, evictionMaxAge)
go hsComponent.Start(ctx)

// Then pass the component to the renderer via RenderServiceConfig:
// renderService := renderer.NewRenderService(&renderer.RenderServiceConfig{
//     ...
//     HTTPStoreComponent: hsComponent,
// })

The component runs on every replica (not leader-only). Live reconciliation establishes shared source authority. A successful pipeline commit accepts new bytes and arms their timers; validation on any replica can fetch a cache miss without mutating shared state.

Events

  • Subscribes: ProposalValidationCompletedEvent (the only subscription — matches the active immutable batch by request ID, then promotes or rejects only its URL versions).
  • Publishes: ProposalValidationRequestedEvent (asks the proposal pipeline to validate pending content), HTTPResourceUpdatedEvent (sibling observability event when a refresh produces new pending content), HTTPResourceAcceptedEvent (after validation promotes pending → accepted), and ReconciliationTriggeredEvent("http_content_validated") after a successful promotion so HAProxy picks up the new content. A rejected proposal is logged and discarded without publishing another event.

These events belong only to periodic refreshes. Initial authoritative candidates are finalized synchronously by their own pipeline transaction.

Render source modes

The renderer assigns source authority explicitly for each operation:

Mode Returned content Shared source and timer
Live reconciliation Matching accepted content, otherwise one render-local candidate Source reconciled immediately; candidate accepted and timer armed only after full pipeline success
Validation Matching pending overlay, then matching accepted content, then a render-local fetch Unchanged
Source-map introspection Matching overlay when supplied, then accepted content, then a render-local fetch Unchanged

This keeps a rejected hypothetical resource from replacing the live fetch credentials, accepted body, or refresh timer. It also keeps a cold live response out of shared accepted state until the exact rendered output succeeds. HTTP periodic-refresh validation still sees the exact pending version through its overlay.

See Also

  • pkg/httpstore — pure candidate admission and two-version refresh cache
  • pkg/controller/renderer — production caller; the renderer sets the wrapper on the rendering context
  • pkg/controller/proposalvalidator — uses the validation-mode behaviour for admission checks
  • pkg/controller/httpstore/CLAUDE.md — refresh-timer design, eviction tuning

License

Apache-2.0 — see root LICENSE.

Documentation

Overview

Package httpstore provides the event adapter for HTTP resource fetching.

This package wraps the pure httpstore component (pkg/httpstore) with event coordination. It manages refresh timers and publishes events when content changes, allowing the reconciliation pipeline to validate new content before accepting it.

Index

Constants

View Source
const (
	// ComponentName is the unique identifier for this component.
	ComponentName = "httpstore"

	// EventBufferSize is the size of the event subscription buffer.
	// Low-volume component handling validation events (~1-2 per reconciliation);
	// HTTP refresh operations are timer-driven, not event-driven.
	EventBufferSize = busevents.StandardSubscriberBuffer
)
View Source
const DefaultOutageRetryInterval = 30 * time.Second

DefaultOutageRetryInterval paces refetching an unavailable critical source that declares no refresh interval.

Variables

View Source
var ErrCandidatePending = errors.New("HTTP candidates are being fetched outside the render")

ErrCandidatePending discards a render until its HTTP candidates have been fetched.

View Source
var ErrCandidateWithheld = errors.New("HTTP content is not accepted yet and this render does not accept new content")

ErrCandidateWithheld reports a critical source that a render left out because its content was not accepted yet.

View Source
var ErrCriticalFetchFailed = errors.New("critical http.Fetch failed")

ErrCriticalFetchFailed prevents resource isolation from retrying an unavailable HTTP input.

Functions

func CandidatesWithheld

func CandidatesWithheld(ctx context.Context) bool

CandidatesWithheld reports whether the render must not accept new HTTP content.

func ParseFetchArgs

func ParseFetchArgs(args []any) (string, httpstore.FetchOptions, *httpstore.AuthConfig, error)

ParseFetchArgs extracts and validates the URL, options, and auth of an http.Fetch call.

func WithCandidatesWithheld

func WithCandidatesWithheld(ctx context.Context) context.Context

WithCandidatesWithheld marks a render that must not accept new HTTP content: unaccepted sources render as unavailable and are not fetched.

Types

type Component

type Component struct {
	// contains filtered or unexported fields
}

Component wraps HTTPStore with event coordination.

It manages:

  • Refresh timers for URLs with interval > 0
  • Event publishing when content changes
  • Pending content promotion/rejection based on proposal validation results
  • Periodic eviction of unused cache entries

Event subscriptions:

  • ProposalValidationCompletedEvent: Check if our validation, promote/reject pending

Event publications:

  • ProposalValidationRequestedEvent: When refreshed content differs from accepted
  • HTTPResourceAcceptedEvent: When pending content is promoted
  • ReconciliationTriggeredEvent: After successful validation promotion

func New

func New(eventBus *busevents.EventBus, logger *slog.Logger, evictionMaxAge time.Duration) *Component

New creates a new HTTPStore event adapter component.

The component subscribes to the EventBus during construction (before EventBus.Start()) to ensure proper startup synchronization.

Parameters:

  • eventBus: The event bus for coordination
  • logger: Logger for debug messages
  • evictionMaxAge: Maximum age for unused entries before eviction (0 disables eviction)

func (*Component) AcceptanceSequence

func (c *Component) AcceptanceSequence() uint64

AcceptanceSequence counts the content acceptances on this replica so far.

func (*Component) AcceptedSnapshot

func (c *Component) AcceptedSnapshot(
	url string,
	descriptor httpstore.SourceDescriptor,
) (httpstore.ContentSnapshot, bool)

AcceptedSnapshot returns the current accepted bytes for one exact declaration.

func (*Component) AdvanceAcceptedReplayState

func (c *Component) AdvanceAcceptedReplayState(
	state *httpstore.AcceptedReplayState,
) (*httpstore.AcceptedReplayState, bool)

AdvanceAcceptedReplayState rebases selective replay state across unrelated changes.

func (*Component) BeginActiveLeases

BeginActiveLeases captures exact relevant changes for one render cache.

func (*Component) BeginReconcileRender

func (c *Component) BeginReconcileRender() (uint64, error)

BeginReconcileRender returns the failure a reconcile render would only repeat, or the epoch to hold at if this render fails on unavailable content.

func (*Component) ChangesSince

func (c *Component) ChangesSince(revision httpstore.Revision) (
	httpstore.Revision,
	[]httpstore.SemanticChange,
	bool,
)

ChangesSince returns exact accepted HTTP changes after revision.

func (*Component) CommitInitialCandidates

func (c *Component) CommitInitialCandidates(
	ctx context.Context,
	candidates []*httpstore.InitialCandidate,
) error

CommitInitialCandidates accepts one complete validated render input set.

func (*Component) CommitInitialCandidatesAndVerify

func (c *Component) CommitInitialCandidatesAndVerify(
	ctx context.Context,
	candidates []*httpstore.InitialCandidate,
	accepted []httpstore.SnapshotToken,
) ([]httpstore.CandidateCommit, httpstore.Revision, error)

CommitInitialCandidatesAndVerify accepts candidates only if all content read earlier in the render still has the same accepted versions.

func (*Component) CommitInitialCandidatesAndVerifyObservations

func (c *Component) CommitInitialCandidatesAndVerifyObservations(
	ctx context.Context,
	candidates []*httpstore.InitialCandidate,
	observations []httpstore.ObservationToken,
) ([]httpstore.CandidateCommit, httpstore.Revision, error)

CommitInitialCandidatesAndVerifyObservations accepts candidates only if all exact present and negative reads still match.

func (*Component) ConfirmAcceptances

func (c *Component) ConfirmAcceptances(observations []httpstore.ObservationToken)

ConfirmAcceptances settles exact source versions read by a passing render.

func (*Component) GetStore

func (c *Component) GetStore() *httpstore.HTTPStore

GetStore returns the underlying HTTPStore. This is used by the wrapper to access cached content.

func (*Component) HoldReconcileRenders

func (c *Component) HoldReconcileRenders(epoch uint64, err error)

HoldReconcileRenders pauses reconcile renders after one, begun at epoch, failed because a critical source is unavailable. Renders resume when the source answers, or after its next failed refetch if a render was skipped.

func (*Component) Name

func (c *Component) Name() string

Name returns the unique identifier for this component. Implements the lifecycle.Component interface.

func (*Component) NewActiveLeaseSet

func (c *Component) NewActiveLeaseSet() (
	*httpstore.ActiveLeaseSet,
	httpstore.ActiveLeaseToken,
	error,
)

NewActiveLeaseSet allocates an empty persistent render-cache lease owner.

func (*Component) PrepareInitialCandidatesAndVerifyObservations

func (c *Component) PrepareInitialCandidatesAndVerifyObservations(
	ctx context.Context,
	candidates []*purehttpstore.InitialCandidate,
	observations []purehttpstore.ObservationToken,
) (*preparedCandidateCommit, error)

func (*Component) PrepareObservationCommitWithActiveLeases

func (c *Component) PrepareObservationCommitWithActiveLeases(
	ctx context.Context,
	observations []purehttpstore.ObservationToken,
	active *purehttpstore.ActiveLeaseCommit,
) (*PreparedInputCommit, error)

PrepareObservationCommitWithActiveLeases prepares verification and one persistent render cache lease transition without a fetch transaction.

func (*Component) ReconcileRenderCompleted

func (c *Component) ReconcileRenderCompleted()

ReconcileRenderCompleted ends every outage: a completed render needed none of those sources, since an unavailable critical source fails its render.

func (*Component) ReconcileSource

func (c *Component) ReconcileSource(
	url string,
	opts httpstore.FetchOptions,
	auth *httpstore.AuthConfig,
) (httpstore.SourceState, error)

ReconcileSource serializes source, timer, and validation-batch authority.

func (*Component) ReconcileURL

func (c *Component) ReconcileURL(url string)

ReconcileURL re-arms or stops a URL timer when its source policy changes.

func (*Component) RegisterURL

func (c *Component) RegisterURL(url string)

RegisterURL reconciles a URL's timer with its current source policy.

func (*Component) ReplayWatermark

func (c *Component) ReplayWatermark() httpstore.Revision

ReplayWatermark returns the complete render-relevant HTTP source epoch.

func (*Component) RequestRenderForAcceptedContent

func (c *Component) RequestRenderForAcceptedContent()

RequestRenderForAcceptedContent triggers a reconcile for content a render accepted without publishing its cache.

func (*Component) RequestRenderForWithheldContent

func (c *Component) RequestRenderForWithheldContent()

RequestRenderForWithheldContent asks for the acceptance attempt for content a deploying render left out.

func (*Component) RetireActiveLeases

func (c *Component) RetireActiveLeases(
	set *httpstore.ActiveLeaseSet,
	token httpstore.ActiveLeaseToken,
) error

RetireActiveLeases removes one render cache's leases and refresh timers.

func (*Component) RevisionSource

func (c *Component) RevisionSource() httpstore.SourceID

RevisionSource identifies this component's accepted HTTP content stream.

func (*Component) RevokeAcceptances

func (c *Component) RevokeAcceptances(sequence uint64) int

RevokeAcceptances takes back the unconfirmed acceptances up to sequence, because HAProxy refused a render that may have read them, and asks for the render without them. It returns how many it revoked.

func (*Component) Start

func (c *Component) Start(ctx context.Context) error

Start begins the component's event loop.

This method blocks until the context is cancelled.

func (*Component) StopRefresher

func (c *Component) StopRefresher(url string)

StopRefresher stops the refresh timer for a specific URL.

func (*Component) VerifyObservations

func (c *Component) VerifyObservations(tokens []httpstore.ObservationToken) bool

VerifyObservations checks exact present and negative HTTP reads.

func (*Component) VerifyReplayEpoch

func (c *Component) VerifyReplayEpoch(epoch *httpstore.ReplayEpoch) bool

VerifyReplayEpoch verifies the complete render-relevant HTTP root.

func (*Component) VerifySnapshots

func (c *Component) VerifySnapshots(tokens []httpstore.SnapshotToken) bool

VerifySnapshots checks that every accepted HTTP token is still current.

func (*Component) Watermark

func (c *Component) Watermark() httpstore.Revision

Watermark returns the latest accepted HTTP semantic revision.

type CriticalFetchError

type CriticalFetchError struct {
	Cause error
}

CriticalFetchError reports a critical source the render could not read.

func (*CriticalFetchError) Error

func (e *CriticalFetchError) Error() string

func (*CriticalFetchError) Is

func (e *CriticalFetchError) Is(target error) bool

func (*CriticalFetchError) Unwrap

func (e *CriticalFetchError) Unwrap() error

type DeferredCandidates

type DeferredCandidates struct {
	// contains filtered or unexported fields
}

DeferredCandidates retains only source reads while the pipeline releases its render graph.

func WithDeferredCandidates

func WithDeferredCandidates(ctx context.Context) (context.Context, *DeferredCandidates)

WithDeferredCandidates moves initial HTTP I/O outside a pipeline's render attempts.

func (*DeferredCandidates) Await

func (d *DeferredCandidates) Await(ctx context.Context) (bool, error)

Await waits only after the render and its cold gate have been released.

func (*DeferredCandidates) Close

func (d *DeferredCandidates) Close()

Close cancels and drains every fetch owned by this pipeline execution.

func (*DeferredCandidates) Discard

func (d *DeferredCandidates) Discard()

Discard drops staged reads before retrying a failed publication fence.

type HTTPStoreWrapper

type HTTPStoreWrapper struct {
	// contains filtered or unexported fields
}

HTTPStoreWrapper exposes HTTPStore content to one template render.

func NewHTTPStoreWrapper

func NewHTTPStoreWrapper(
	ctx context.Context,
	component *Component,
	logger *slog.Logger,
	overlay stores.HTTPContentOverlay,
	sourceMode SourceMode,
) *HTTPStoreWrapper

NewHTTPStoreWrapper creates a new HTTPStoreWrapper.

func NewHTTPStoreWrapperWithRetrySeed

func NewHTTPStoreWrapperWithRetrySeed(
	ctx context.Context,
	component *Component,
	logger *slog.Logger,
	overlay stores.HTTPContentOverlay,
	sourceMode SourceMode,
	retrySeed *InputRetrySeed,
) *HTTPStoreWrapper

NewHTTPStoreWrapperWithRetrySeed creates a wrapper with detached retry inputs.

func (*HTTPStoreWrapper) CandidateWithheld

func (w *HTTPStoreWrapper) CandidateWithheld(url string) bool

CandidateWithheld reports whether this render left the source out because its content was not accepted yet.

func (*HTTPStoreWrapper) CaptureAcceptedReplayState

func (w *HTTPStoreWrapper) CaptureAcceptedReplayState(
	snapshots []httpstore.ContentSnapshot,
) (*httpstore.AcceptedReplayState, bool)

CaptureAcceptedReplayState binds every accepted read to one selective cursor.

func (*HTTPStoreWrapper) CommittedAcceptedReplayState

func (w *HTTPStoreWrapper) CommittedAcceptedReplayState() (*httpstore.AcceptedReplayState, bool)

CommittedAcceptedReplayState returns the exact HTTP publication retained by this render.

func (*HTTPStoreWrapper) ContentSnapshots

func (w *HTTPStoreWrapper) ContentSnapshots() ([]httpstore.ContentSnapshot, bool)

ContentSnapshots returns the exact HTTP versions read by this render.

func (*HTTPStoreWrapper) Fetch

func (w *HTTPStoreWrapper) Fetch(args ...any) (any, error)

Fetch fetches content from a URL.

Template usage:

Basic fetch (no refresh):
  {{ http.Fetch("https://example.com/data.txt") }}

With a refresh interval for re-checking accepted content:
  {{ http.Fetch("https://example.com/data.txt", {"interval": "60s"}) }}

With options:
  {{ http.Fetch("https://example.com/data.txt", {"interval": "5m", "timeout": "30s", "retries": 3, "critical": true}) }}

With authentication:
  {{ http.Fetch("https://api.example.com/data", {"interval": "5m"}, {"type": "bearer", "token": token}) }}
  {{ http.Fetch("https://api.example.com/data", {"interval": "5m"}, {"type": "basic", "username": user, "password": pass}) }}

Parameters (variadic):

  • url (string, required): The HTTP(S) URL to fetch
  • options (map, optional): {"interval": "60s", "timeout": "30s", "retries": 3, "critical": true}
  • auth (map, optional): {"type": "bearer"|"basic"|"header", "token": "...", "username": "...", "password": "..."}

Returns:

  • Content string (empty if fetch failed and not critical)
  • Error if critical fetch fails

func (*HTTPStoreWrapper) FetchSnapshot

func (w *HTTPStoreWrapper) FetchSnapshot(args ...any) (any, httpstore.ContentSnapshot, error)

FetchSnapshot performs one fetch and returns the exact input version used by this call.

func (*HTTPStoreWrapper) InputTransaction

func (w *HTTPStoreWrapper) InputTransaction() *InputTransaction

InputTransaction returns the authoritative render's candidate transaction.

func (*HTTPStoreWrapper) Pending

func (w *HTTPStoreWrapper) Pending(url string) bool

Pending reports whether this render left the URL out because its content waits for a render that can accept it.

func (*HTTPStoreWrapper) RenderFailure

func (w *HTTPStoreWrapper) RenderFailure() error

RenderFailure preserves required fetch errors even when Scriggo discards a call's error value.

func (*HTTPStoreWrapper) ReplaySnapshot

func (w *HTTPStoreWrapper) ReplaySnapshot(
	snapshot *httpstore.ContentSnapshot,
) (httpstore.ContentSnapshot, bool, error)

ReplaySnapshot pins a cached accepted dependency without performing network I/O.

func (*HTTPStoreWrapper) RequireAcceptedReplayState

func (w *HTTPStoreWrapper) RequireAcceptedReplayState(
	state *httpstore.AcceptedReplayState,
) (*httpstore.AcceptedReplayState, error)

RequireAcceptedReplayState adds selective accepted HTTP inputs to the end fence.

func (*HTTPStoreWrapper) RevisionSource

func (w *HTTPStoreWrapper) RevisionSource() httpstore.SourceID

RevisionSource identifies the accepted content stream observed by this wrapper.

type InputRetrySeed

type InputRetrySeed struct {
	// contains filtered or unexported fields
}

InputRetrySeed carries immutable HTTP reads across one internal render retry.

type InputTransaction

type InputTransaction struct {
	// contains filtered or unexported fields
}

InputTransaction owns authoritative HTTP candidates for one render.

func (*InputTransaction) Abort

func (t *InputTransaction) Abort()

Abort discards render-local candidates.

func (*InputTransaction) Cacheable

func (t *InputTransaction) Cacheable() bool

Cacheable reports whether every HTTP read produced an exact content version.

func (*InputTransaction) Commit

func (t *InputTransaction) Commit(ctx context.Context) error

Commit atomically accepts every candidate used by the validated render.

func (*InputTransaction) HTTPObservations

func (t *InputTransaction) HTTPObservations() []purehttpstore.ObservationToken

HTTPObservations identifies accepted versions this execution actually read.

func (*InputTransaction) HasCandidates

func (t *InputTransaction) HasCandidates() bool

HasCandidates reports whether this render accepted HTTP content no previous render had. Only such a render needs the synchronous check before its commit: content already in the store was checked when it was first accepted.

func (*InputTransaction) PrepareCommit

func (t *InputTransaction) PrepareCommit(ctx context.Context) (*PreparedInputCommit, error)

PrepareCommit validates every input and retains publication authority.

func (*InputTransaction) PrepareCommitPreservingRefreshers

func (t *InputTransaction) PrepareCommitPreservingRefreshers(
	ctx context.Context,
	additional []purehttpstore.ObservationToken,
	active *purehttpstore.ActiveLeaseCommit,
) (*PreparedInputCommit, error)

PrepareCommitPreservingRefreshers publishes inputs without changing timer ownership.

func (*InputTransaction) PrepareCommitWithObservations

func (t *InputTransaction) PrepareCommitWithObservations(
	ctx context.Context,
	additional []purehttpstore.ObservationToken,
) (*PreparedInputCommit, error)

PrepareCommitWithObservations also validates exact inputs held by a render graph.

func (*InputTransaction) PrepareCommitWithObservationsAndActiveLeases

func (t *InputTransaction) PrepareCommitWithObservationsAndActiveLeases(
	ctx context.Context,
	additional []purehttpstore.ObservationToken,
	active *purehttpstore.ActiveLeaseCommit,
) (*PreparedInputCommit, error)

PrepareCommitWithObservationsAndActiveLeases also prepares one render cache's exact persistent HTTP dependency transition.

func (*InputTransaction) ProvisionalURLs

func (t *InputTransaction) ProvisionalURLs() []string

func (*InputTransaction) RetrySeed

func (t *InputTransaction) RetrySeed() *InputRetrySeed

RetrySeed snapshots fetched inputs without transferring transaction state.

func (*InputTransaction) Snapshots

Snapshots returns the exact versions read by this render.

func (*InputTransaction) Withheld

func (t *InputTransaction) Withheld(url string) bool

Withheld reports whether this render left the source out because it was not accepted yet.

type PreparedInputCommit

type PreparedInputCommit struct {
	// contains filtered or unexported fields
}

PreparedInputCommit retains HTTP input authority across coordinated publication.

func (*PreparedInputCommit) Abort

func (c *PreparedInputCommit) Abort()

Abort rolls back a tentative publication and releases retained authority.

func (*PreparedInputCommit) CommitPublishedPublication

func (c *PreparedInputCommit) CommitPublishedPublication() error

CommitPublishedPublication records a rollback-capable publication decision.

func (*PreparedInputCommit) PlannedActiveLeases

PlannedActiveLeases returns the lease token published with this commit.

func (*PreparedInputCommit) Publish

func (c *PreparedInputCommit) Publish() bool

Publish reports whether publication won over Abort.

func (*PreparedInputCommit) PublishSealed

func (c *PreparedInputCommit) PublishSealed()

PublishSealed completes a publication returned successfully from SealPublication.

func (*PreparedInputCommit) Release

func (c *PreparedInputCommit) Release()

Release exposes the coordinated publication and releases retained authority.

func (*PreparedInputCommit) ReleaseCommittedPublication

func (c *PreparedInputCommit) ReleaseCommittedPublication()

ReleaseCommittedPublication exposes committed state and releases retained authority.

func (*PreparedInputCommit) SealPublication

func (c *PreparedInputCommit) SealPublication() error

SealPublication retains an authenticated terminal publication with no remaining fallible work.

func (*PreparedInputCommit) ValidatePublication

func (c *PreparedInputCommit) ValidatePublication() error

ValidatePublication verifies that the retained commit can enter its terminal publication.

func (*PreparedInputCommit) ValidatePublishedPublication

func (c *PreparedInputCommit) ValidatePublishedPublication() error

ValidatePublishedPublication authenticates tentative live state without releasing authority.

type SourceMode

type SourceMode uint8

SourceMode controls whether a render may replace the shared HTTP source.

const (
	// SourceModeReadOnly keeps source declarations and fetched content local to one render.
	SourceModeReadOnly SourceMode = iota
	// SourceModeAuthoritative reconciles accepted sources and their refresh timers.
	SourceModeAuthoritative
)

Jump to

Keyboard shortcuts

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