Skip to Content
SDKsGoExecutions

Go Executions

Execution calls perform governed runtime actions and return canonical envelope metadata.

Go

response, err := session.Execute(ctx, driftgate.ExecutionRequest{
  Input: map[string]any{"orderId": "123", "reason": "duplicate"},
  Route: &driftgate.RouteRef{Provider: "openai", Model: "gpt-4o-mini"},
})
if response.Error != nil { panic(response.Error.Code) }
fmt.Println(response.Meta.RequestId)

Required Invariants

  • meta.requestId always present
  • meta.timingMs.total always present
  • error populated indicates failure; successful calls keep error null and return data
  • Correlate request IDs with audit and lineage views
  • Treat retryable=true as hint, not guarantee
Last updated on