Documentation
¶
Index ¶
- func NewRequestID() string
- func NormalizeGeneratedSubmissionBatch(batch interfaces.GeneratedSubmissionBatch, ...) ([]interfaces.SubmitRequest, error)
- func NormalizeWorkRequest(req interfaces.WorkRequest, opts interfaces.WorkRequestNormalizeOptions) ([]interfaces.SubmitRequest, error)
- func ParseCanonicalWorkRequestJSON(data []byte) (interfaces.WorkRequest, error)
- func ResolveWorkRequestCurrentChainingTraceID(current string, legacy string) string
- func SubmitResultFromNormalized(requestID string, normalized []interfaces.SubmitRequest) interfaces.WorkRequestSubmitResult
- func SubmitWorkName(req interfaces.SubmitRequest) string
- func ValidateCanonicalWorkRequestJSON(data []byte) error
- func ValidateWorkRequestTraceFieldAliases(currentRaw json.RawMessage, legacyCurrentRaw json.RawMessage, ...) error
- func ValidateWorkRequestTraceFields(current string, legacy string) error
- func WorkRequestFromSubmitRequests(requests []interfaces.SubmitRequest) interfaces.WorkRequest
- func WorkRequestRecordFromSubmitRequests(requestID string, source string, requests []interfaces.SubmitRequest) interfaces.WorkRequestRecord
- func WorkRequestSubmitResultFromNormalized(requestID string, work []interfaces.SubmitRequest, accepted bool) interfaces.WorkRequestSubmitResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRequestID ¶
func NewRequestID() string
NewRequestID returns a unique request identifier for programmatic work submission.
func NormalizeGeneratedSubmissionBatch ¶
func NormalizeGeneratedSubmissionBatch(batch interfaces.GeneratedSubmissionBatch, opts interfaces.WorkRequestNormalizeOptions) ([]interfaces.SubmitRequest, error)
NormalizeGeneratedSubmissionBatch validates the canonical generated request and merges optional runtime submission fields onto the matching work items.
func NormalizeWorkRequest ¶
func NormalizeWorkRequest(req interfaces.WorkRequest, opts interfaces.WorkRequestNormalizeOptions) ([]interfaces.SubmitRequest, error)
NormalizeWorkRequest validates a FACTORY_REQUEST_BATCH and converts it into runtime submit requests.
func ParseCanonicalWorkRequestJSON ¶
func ParseCanonicalWorkRequestJSON(data []byte) (interfaces.WorkRequest, error)
ParseCanonicalWorkRequestJSON parses a public FACTORY_REQUEST_BATCH JSON payload and rejects retired aliases that must not be accepted on public submit boundaries.
func ResolveWorkRequestCurrentChainingTraceID ¶
ResolveWorkRequestCurrentChainingTraceID returns the effective chaining trace, preferring the current field while preserving legacy traceId fallback.
func SubmitResultFromNormalized ¶
func SubmitResultFromNormalized(requestID string, normalized []interfaces.SubmitRequest) interfaces.WorkRequestSubmitResult
SubmitResultFromNormalized builds accepted batch metadata from normalized submit requests.
func SubmitWorkName ¶
func SubmitWorkName(req interfaces.SubmitRequest) string
SubmitWorkName returns the canonical display name for a submit request.
func ValidateCanonicalWorkRequestJSON ¶
ValidateCanonicalWorkRequestJSON rejects unsupported public aliases and conflicting trace-field combinations before canonical work-request JSON is normalized into the runtime request model.
func ValidateWorkRequestTraceFieldAliases ¶
func ValidateWorkRequestTraceFieldAliases(currentRaw json.RawMessage, legacyCurrentRaw json.RawMessage, traceRaw json.RawMessage, legacyTraceRaw json.RawMessage) error
ValidateWorkRequestTraceFieldAliases resolves supported trace field aliases and rejects mismatched currentChainingTraceId versus traceId values.
func ValidateWorkRequestTraceFields ¶
ValidateWorkRequestTraceFields rejects mismatched currentChainingTraceId and traceId values when both are explicitly populated.
func WorkRequestFromSubmitRequests ¶
func WorkRequestFromSubmitRequests(requests []interfaces.SubmitRequest) interfaces.WorkRequest
WorkRequestFromSubmitRequests wraps normalized submit requests in the canonical FACTORY_REQUEST_BATCH contract.
func WorkRequestRecordFromSubmitRequests ¶
func WorkRequestRecordFromSubmitRequests(requestID string, source string, requests []interfaces.SubmitRequest) interfaces.WorkRequestRecord
WorkRequestRecordFromSubmitRequests builds the canonical request-history record for a normalized batch submission.
func WorkRequestSubmitResultFromNormalized ¶
func WorkRequestSubmitResultFromNormalized(requestID string, work []interfaces.SubmitRequest, accepted bool) interfaces.WorkRequestSubmitResult
WorkRequestSubmitResultFromNormalized builds accepted-request metadata from normalized submit requests, including per-work identifiers for batch upserts and primary-work fields for unary submit responses.
Types ¶
This section is empty.