Tactors is a typed, builder-first actor SDK for Go. You describe state, handlers, activities, and
runtime knobs in one fluent API and receive a deterministic actor description that every runtime can
consume—no code generation or interface{} plumbing. We still touch Go’s %T formatting to label
types, but handler routing stays strongly typed.
- Typed actor builders: fix state with
actors.NewStateful, get typed commands/queries/activities via helper embeds, and build once for every runtime consumer. - Declarative knobs: retries, timeouts, caches, queue overrides, snapshots, and validators live on the builder so intent is obvious.
- Temporal-first runtime: one
actors.Descriptionpowers worker registration, Ask/Query plumbing, and the deterministic testsuite—no alt runtimes or codegen. - Ops hooks: spans/metrics around commands and cross-actor calls; rotation/versioning via
WithSnapshotandactors.Patch.
- New to the ecosystem? Read
docs/NEW_TO_TEMPORAL.mdanddocs/NEW_TO_ACTORS.mdfor the quick primers. - Build the smallest actor in
docs/GETTING_STARTED.mdand run it against the Temporal testsuite (go test). - Browse runnable samples in
docs/EXAMPLES.md(code lives at https://github.com/tactors/samples).
- Builder reference:
docs/ACTOR_BUILDER.md. - Runtime/worker behavior:
docs/RUNTIME_TEMPORAL.md. - Temporal-first map:
docs/INDEX.mdanddocs/TEMPORAL_MENTAL_MODEL.md. - Ops & maintenance:
docs/DIAGNOSTICS.mdanddocs/CONTROL_WORKFLOWS.md. - Orchestration pattern:
docs/ACTIVITY_FLOW_PATTERN.mdfor “actor is the graph” guidance. - Contributing:
docs/CONTRIBUTING.md.
testkit.ActorTemporalScenarioruns actors against Temporal’s testsuite. Stub activities inline withWhenActivity(...); it infers names from typed signatures or accepts explicit names.- Inspect merged activity options with
ExpectActivityOptionshelpers before execution.
runtimeregisters workflows/activities from an actor description and wires Ask/Query/Spawn to Temporal signals, queries, and child workflows.runtime.NewWorkerSetreuses workers per queue and rotates histories automatically whenWithSnapshotorGetContinueAsNewSuggested()triggers.- Queue defaults match the actor kind (
<kind>-workflow/<kind>-activity), and workers auto-disable the unused role so activity-only or workflow-only actors do not need extra flags. If you explicitly point both roles at the same queue and register both, one worker serves both. - Activity calls get safe defaults: a StartToClose of 30s and ScheduleToClose of 2m are applied if
you don’t set either. Override with
actors.WithActivityStartToCloseoractors.WithActivityScheduleToCloseper-call or viaWithActivityDefaults.
actors/– builder, typed helpers, and shared primitives.runtime/– Temporal runner plus typed client utilities.testkit/– deterministic harnesses (Temporal scenario and testing helpers).observability/– pluggable tracing/metrics hooks;internal/– supporting packages as we flesh out tooling.- Samples now live in the sibling repo: https://github.com/tactors/samples.
Run the full suite (unit tests and Temporal testsuite scenarios) with:
GOCACHE=$(pwd)/.gocache go test ./...No external Temporal server is required—the testsuite handles registration, fake time, and cleanup.
Released under the MIT License.