Skip to content

feat: add control plane and data plane registration - #24

Merged
paullatzelsperger merged 2 commits into
mainfrom
feat/registration
Nov 9, 2026
Merged

paullatzelsperger merged 2 commits into
mainfrom
feat/registration

Conversation

@paullatzelsperger

Copy link
Copy Markdown
Contributor

Phase 6 of the Data Plane Signaling v1.0 migration: registration in both directions.

  • Messages: ControlPlaneRegistrationMessage, DataPlaneRegistrationMessage and AuthorizationEntry (flattened {"type", ...}), validated and checked against the published schemas. authorization is required.
  • ControlPlaneStore with memory and Postgres (control_plane_schema.sql) implementations. With WithControlPlaneStore, NewHandler mounts PUT /v1/controlplanes and DELETE /v1/controlplanes/{controlPlaneId}, and Notify* callbacks go to the flow's registered control plane.
  • Prepare and start record the calling control plane on the flow (WithControlPlaneIdentifier; default: the only registered control plane, to be replaced by authorization in the next PR).
  • RegisterDataPlane / DeregisterDataPlane call PUT /dataplanes and DELETE /dataplanes/{id} on the control plane, with the same retry rules as callbacks.
  • Fix: memory.InMemoryTrxContext now passes the caller's context instead of context.TODO().
  • async-start-dataplane example registers in both directions; short README section.

Out of scope: authorization (next PR).

🤖 Generated with Claude Code

- registration messages (ControlPlaneRegistrationMessage,
  DataPlaneRegistrationMessage, AuthorizationEntry) with schema tests
- ControlPlaneStore with memory and Postgres implementations; callbacks
  resolve the endpoint of the flow's registered control plane
- PUT/DELETE /controlplanes, mounted when a store is configured;
  prepare and start record the calling control plane on the flow
- RegisterDataPlane and DeregisterDataPlane (PUT/DELETE /dataplanes)
- InMemoryTrxContext now passes the caller's context through

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@paullatzelsperger paullatzelsperger self-assigned this Nov 9, 2026
The samples started their HTTP servers with ListenAndServe in a
goroutine and sent the first signaling request right away, which
failed with "connection refused" when the server had not bound its
port yet. common.StartServer now binds synchronously and serves in the
background.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@paullatzelsperger paullatzelsperger added the enhancement New feature or request label Nov 9, 2026
@paullatzelsperger
paullatzelsperger merged commit 6402c76 into main Nov 9, 2026
6 checks passed
@paullatzelsperger
paullatzelsperger deleted the feat/registration branch November 9, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants