Skip to content

feat: add control plane client and data plane callbacks - #23

Merged
paullatzelsperger merged 1 commit into
mainfrom
feat/controlplane-callbacks
Nov 9, 2026
Merged

paullatzelsperger merged 1 commit into
mainfrom
feat/controlplane-callbacks

Conversation

@paullatzelsperger

Copy link
Copy Markdown
Contributor

Phase 5 of the Data Plane Signaling v1.0 migration: the data plane can now call its control plane.

  • ControlPlaneClient with an HTTP implementation for POST /transfers/{id}/dataflow/{prepared|started|completed|errored} and GET /transfers/{id}/agreement (returned as raw JSON, see the doc comment). The flow id is escaped as a single path segment.
  • NotifyPrepared, NotifyStarted, NotifyCompleted, NotifyErrored: transition the flow, send the DataFlowStatusMessage, and persist only after a 2xx. Failed callbacks leave the stored flow unchanged.
  • Retries on 5xx and network errors with exponential backoff (RetryPolicy, default 3 attempts from 200ms); 4xx is never retried and surfaces as *ControlPlaneError.
  • SuspendLocally/ResumeLocally for data-plane-initiated suspension (no callback; the spec defines none).
  • Options WithControlPlane(url), WithControlPlaneResolver, WithControlPlaneClient; ControlPlaneResolver is the seam for registration (next PR).
  • New async-start-dataplane example (202 + NotifyStarted), added to the CI example matrix; short README section.

Out of scope: registration and authorization (next PRs). ControlPlaneID on flows is not populated yet; the static resolver ignores it.

🤖 Generated with Claude Code

- ControlPlaneClient with an HTTP implementation for
  POST /transfers/{id}/dataflow/{prepared|started|completed|errored}
  and GET /transfers/{id}/agreement, retrying 5xx and network errors
  with exponential backoff (RetryPolicy), typed ControlPlaneError
- NotifyPrepared, NotifyStarted, NotifyCompleted and NotifyErrored:
  transition the flow, send the DataFlowStatusMessage and persist the
  flow only after the control plane answers 2xx
- SuspendLocally and ResumeLocally for data-plane-initiated suspension
- WithControlPlane, WithControlPlaneResolver and WithControlPlaneClient
  options; ControlPlaneResolver as the seam for registration
- async-start-dataplane example, added to the CI example runs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@paullatzelsperger
paullatzelsperger merged commit da5d486 into main Nov 9, 2026
6 checks passed
@paullatzelsperger
paullatzelsperger deleted the feat/controlplane-callbacks branch November 9, 2026 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants