mirror of
https://github.com/hanzoai/tasks.git
synced 2026-10-04 02:04:03 +00:00
pkg/sdk/examples/embed.go — boots tasks.Embed in-process on an ephemeral port, dials it via pkg/sdk/client, round-trips Health → ExecuteWorkflow → ListWorkflows. This is the canonical "single binary" pattern Hanzo Base apps use when TASKS_EMBED=true. pkg/sdk/examples/realtime.go — exercises the full realtime pipeline: embedded daemon → engine broker → SSE handler → client.SubscribeEvents → caller channel. Starts 3 workflows, cancels even-indexed, asserts events arrived on the SDK channel. Proves the realtime path works end-to-end without HTTP proxy or gRPC. Tests: TestHealth PASS TestHello PASS TestSignal PASS TestCron PASS TestEmbed PASS (NEW — Base TASKS_EMBED path) TestRealtime PASS (NEW — SSE → SDK channel pipeline) All over native ZAP. Zero gRPC. Zero go.temporal.io. Zero proxy.