PrismCore / API reference / Probing and input

Structure

SourcePrewarmOutcome

struct SourcePrewarmOutcome

Declared in Sources/PrismCore/Probe/SourcePrewarm.swift · PrismCore 3.5.4

What a prewarm did, for the host's log line.

A prewarm is advice to the engine, never a precondition: every status other than .stored means the next play opens exactly as it would have without one, and nothing here is an error a host has to handle.

Instance properties

let status: Status

No documentation comment in the source.

let storedBytes: Int

Bytes held for this source after the prewarm; 0 unless .stored.

let requests: Int

Requests the prewarm sent to the origin — the number that costs time against a host proxy that fetches each forwarded window whole. A request the origin coordinator declined to admit was never sent and is not counted, so .originBusy from a first request reports 0.

let validator: String?

The strong ETag the origin reported, when it reported one.

let headerBytes: Int?

Where the container's header ends, when the prewarmed head reached it.

let indexPrewarmed: Bool

Whether the container's tail index (Matroska Cues, a trailing moov) is among the stored bytes — seen there, not inferred: the Cues element ID at the SeekHead's offset, or a moov box header in the boxes after mdat.

let duration: Duration

No documentation comment in the source.

Enumeration

SourcePrewarmOutcome.Status

enum Status

No documentation comment in the source.

Cases

case stored

Bytes are in memory and the next coordinated read of this URL and headers will offer them to the origin's validator.

case notApplicable

Not an http/https URL. File and host-supplied inputs have no round trips to save.

case validatorUnavailable

The origin reported no strong ETag, so nothing could bind the bytes to a representation. Refused by rule: stale bytes handed to a demuxer are a wrong parse, not a slow one. A Last-Modified date alone lands here too — at one-second resolution it cannot tell two versions written within the same second apart.

case originBusy

The origin refused someone within the last minute, or never had a free slot while this prewarm was willing to wait. Optional work does not queue behind playback, nor add to a throttled origin.

case originRefused(status: Int)

The origin answered 429 / 503 / 509. Recorded with the shared coordinator (so playback backs off too) and not retried.

case unusableResponse(status: Int?)

No usable 206: a server that ignores Range, a redirect, a 4xx, a dropped transfer. status is nil when nothing arrived.

case changedDuringPrewarm

The validator or length changed between two of this prewarm's own requests. Nothing was stored.

case exceedsCapacity

What was fetched is larger than the whole store. Nothing was stored; with the budget clamp this means a store configured smaller than one source.

case cancelled

No documentation comment in the source.

Generated from the public symbols of PrismCore 3.5.4. All types