Documentation
¶
Overview ¶
Package observation defines cheap typed work milestones. Producers report actual work; consumers own scheduling and presentation.
Index ¶
Constants ¶
View Source
const ( // Preparation resolves instructions, destinations and required resources. Preparation Phase = 0 // InputInspection captures and inspects sources, which can overlap. InputInspection Phase = 1 // Layout measures or renders distinct generated specifications. Layout Phase = 2 // Assembly imports source occurrences and compiles output pages. Assembly Phase = 3 // Optimization enters the backend optimizer. Optimization Phase = 4 // OutputWriting writes the staged PDF once. OutputWriting Phase = 5 // OutputVerification reads and verifies the staged output. OutputVerification Phase = 6 // Publication stages and publishes requested deliverables. Publication Phase = 7 // Finalization includes workspace cleanup and report salvage. Finalization Phase = 8 // PhaseCount bounds consumer state; it is not a valid phase. PhaseCount Phase = 9 // UnitNone denotes an indeterminate milestone without a counter. UnitNone Unit = 0 // CapturedSources counts successfully captured distinct PDF sources. CapturedSources Unit = 1 // ProcessedSources counts returned source attempts, including failures. ProcessedSources Unit = 2 // ProcessedGeneratedSpecs counts returned layout/render spec attempts. ProcessedGeneratedSpecs Unit = 3 // ImportedSources counts actual successful source-document imports, // including per-occurrence reimports but excluding generated resources. ImportedSources Unit = 4 // CompiledPages counts actual output-page placements. CompiledPages Unit = 5 // UnitCount bounds consumer state; it is not a valid unit. UnitCount Unit = 6 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Milestone ¶
type Milestone struct {
Completed int64
Total int64
Phase Phase
Unit Unit
TotalKnown bool
Advance bool
}
Milestone is a phase boundary or an actual cumulative work observation. UnitNone has no counter. Total is meaningful only when TotalKnown is true. Advance marks a real work milestone without a measurable counter.
type Observer ¶
type Observer interface{ Observe(milestone Milestone) }
Observer accepts a milestone without waiting for presentation or I/O.
Click to show internal directories.
Click to hide internal directories.