Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PlanIntent ¶
func PlanIntent(planner EnginePlanner, intent Intent) (*engine.TransferPlan, error)
PlanIntent maps transfer boundaries into the engine planner request. The materialization destination is the write boundary; the published destination is intentionally not used for pair probing.
func PublicRole ¶
PublicRole returns the transfer role token used by public CLI JSON.
Types ¶
type Data ¶
type Data struct {
Transfers []Record `json:"transfers"`
}
Data is the canonical JSON payload shape for transfer-capable command data.
type EnginePlanner ¶
type EnginePlanner interface {
PlanTransfer(engine.TransferPlanRequest) (*engine.TransferPlan, error)
}
EnginePlanner is the engine planner surface used by the transfer adapter.
type Intent ¶
type Intent struct {
TransferID string
Operation string
Phase string
Primary bool
ResultKind ResultKind
PermissionScope PermissionScope
SourceRole string
SourcePath string
DestinationRole string
MaterializationDestination string
CapabilityProbePath string
PublishedDestination string
RequestedEngine model.EngineType
}
Intent captures the stable operation-local transfer identity and path boundaries before engine planning runs.
func (Intent) PlanRequest ¶
func (i Intent) PlanRequest() engine.TransferPlanRequest
PlanRequest returns the engine planner request for this intent.
type PerformanceClass ¶
type PerformanceClass string
PerformanceClass is the user-facing transfer class. It is intentionally separate from descriptor-level engine performance descriptors.
const ( PerformanceClassFastCopy PerformanceClass = "fast_copy" PerformanceClassNormalCopy PerformanceClass = "normal_copy" )
func PerformanceClassForOptimized ¶
func PerformanceClassForOptimized(optimized bool) PerformanceClass
PerformanceClassForOptimized maps the final transfer outcome to the stable user-facing class used by data.transfers[].
type PermissionScope ¶
type PermissionScope string
PermissionScope prevents preview planning evidence from being confused with permission to execute a later write.
const ( PermissionScopePreviewOnly PermissionScope = "preview_only" PermissionScopeExecution PermissionScope = "execution" )
type PublicData ¶
type PublicData struct {
Transfers []PublicRecord `json:"transfers"`
}
PublicData is the public JSON payload shape for transfer-capable command data after internal transfer records have been exported.
type PublicRecord ¶
type PublicRecord struct {
TransferID string `json:"transfer_id"`
Operation string `json:"operation"`
Phase string `json:"phase"`
Primary bool `json:"primary"`
ResultKind ResultKind `json:"result_kind"`
PermissionScope PermissionScope `json:"permission_scope"`
SourceRole string `json:"source_role"`
SourcePath string `json:"source_path"`
DestinationRole string `json:"destination_role"`
MaterializationDestination string `json:"materialization_destination"`
CapabilityProbePath string `json:"capability_probe_path"`
PublishedDestination string `json:"published_destination"`
CheckedForThisOperation bool `json:"checked_for_this_operation"`
RequestedEngine model.EngineType `json:"requested_engine"`
EffectiveEngine model.EngineType `json:"effective_engine"`
OptimizedTransfer bool `json:"optimized_transfer"`
PerformanceClass PerformanceClass `json:"performance_class"`
DegradedReasons []string `json:"degraded_reasons"`
Warnings []string `json:"warnings"`
}
PublicRecord is the public data.transfers[] entry exported by CLI JSON. Internal records keep storage paths and planner roles; public records expose user-facing roles and location references instead of promising .jvs layout.
func PublicRecordFromRecord ¶
func PublicRecordFromRecord(record Record) PublicRecord
PublicRecordFromRecord exports a transfer record for CLI JSON. It preserves operation identity and copy evidence, while converting storage roles and paths into stable public vocabulary.
func PublicRecordsFromRecords ¶
func PublicRecordsFromRecords(records []Record) []PublicRecord
PublicRecordsFromRecords exports a slice of internal records for CLI JSON.
type Record ¶
type Record struct {
TransferID string `json:"transfer_id"`
Operation string `json:"operation"`
Phase string `json:"phase"`
Primary bool `json:"primary"`
ResultKind ResultKind `json:"result_kind"`
PermissionScope PermissionScope `json:"permission_scope"`
SourceRole string `json:"source_role"`
SourcePath string `json:"source_path"`
DestinationRole string `json:"destination_role"`
MaterializationDestination string `json:"materialization_destination"`
CapabilityProbePath string `json:"capability_probe_path"`
PublishedDestination string `json:"published_destination"`
CheckedForThisOperation bool `json:"checked_for_this_operation"`
RequestedEngine model.EngineType `json:"requested_engine"`
EffectiveEngine model.EngineType `json:"effective_engine"`
OptimizedTransfer bool `json:"optimized_transfer"`
PerformanceClass PerformanceClass `json:"performance_class"`
DegradedReasons []string `json:"degraded_reasons"`
Warnings []string `json:"warnings"`
}
Record is the canonical data.transfers[] entry.
func RecordFromPlanAndRuntime ¶
func RecordFromPlanAndRuntime(intent Intent, plan *engine.TransferPlan, runtime *engine.CloneResult) Record
RecordFromPlanAndRuntime merges the engine plan and runtime clone result into one canonical transfer record.
type Result ¶
type Result struct {
CheckedForThisOperation bool
RequestedEngine model.EngineType
EffectiveEngine model.EngineType
OptimizedTransfer bool
PerformanceClass PerformanceClass
DegradedReasons []string
Warnings []string
}
Result is the planner/runtime transfer outcome before it is combined with intent identity fields for public JSON, audit, or metadata surfaces.
func ResultFromPlanAndRuntime ¶
func ResultFromPlanAndRuntime(intent Intent, plan *engine.TransferPlan, runtime *engine.CloneResult) Result
ResultFromPlanAndRuntime combines planner degradations/warnings with runtime fallback information. Runtime effective engine wins because it reflects what actually completed the write.
type ResultKind ¶
type ResultKind string
ResultKind describes whether a transfer record is an expected preview result or the final result of a write operation.
const ( ResultKindExpected ResultKind = "expected" ResultKindFinal ResultKind = "final" )