Skip to content

pool: add keyed worker messages#76

Merged
raphael merged 2 commits into
mainfrom
pool-dispatch-message
May 21, 2026
Merged

pool: add keyed worker messages#76
raphael merged 2 commits into
mainfrom
pool-dispatch-message

Conversation

@raphael
Copy link
Copy Markdown
Member

@raphael raphael commented May 21, 2026

Summary

  • Add DispatchMessage for hash-ring-routed worker messages that do not create or depend on job ownership.
  • Keep NotifyWorker job-scoped while introducing an explicit MessageHandler contract for message-capable workers.
  • Document message semantics and cover routing, missing-handler errors, and keyed payload encoding with focused tests.

Test plan

  • GOWORK=off go test ./pool -run 'TestDispatchMessage|TestNotifyWorkerNoHandler|TestMarshalKeyedPayload' -count=1
  • GOWORK=off go test -p 1 ./... -count=1

Reviewer notes

Start with pool/node.go and pool/worker.go; the rest is codec reuse, tests, and README contract documentation.

@raphael raphael merged commit 86464cc into main May 21, 2026
5 checks passed
@raphael raphael deleted the pool-dispatch-message branch May 21, 2026 16:34
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.

1 participant