No description
  • Go 98.1%
  • Dockerfile 1.1%
  • Makefile 0.8%
Find a file
zemdregon f07f1e711e
Some checks are pending
CI / lint (push) Waiting to run
CI / test (push) Waiting to run
CI / build (push) Waiting to run
CI / docker (push) Blocked by required conditions
chore(deps): bump actions/setup-go to v7 (#16)
* chore(deps): bump actions/setup-go to v7

Self-hosted CI workflows.

* ci: setup-go v7 + cache false
2026-08-12 09:48:04 -05:00
.github chore(deps): bump actions/setup-go to v7 (#16) 2026-08-12 09:48:04 -05:00
cmd/module refactor: align with muxcore-module-starter template 2026-06-12 11:50:06 -05:00
deploy refactor: align with muxcore-module-starter template 2026-06-12 11:50:06 -05:00
internal refactor: align with muxcore-module-starter template 2026-06-12 11:50:06 -05:00
test refactor: align with muxcore-module-starter template 2026-06-12 11:50:06 -05:00
.dockerignore refactor: align with muxcore-module-starter template 2026-06-12 11:50:06 -05:00
.env.example refactor: align with muxcore-module-starter template 2026-06-12 11:50:06 -05:00
.gitignore chore: remove committed build binaries from git 2026-08-07 10:43:19 -05:00
.golangci.yml docs: deprecate worker-pool-memory in favor of core pool (#12) 2026-08-09 20:15:35 -05:00
CHANGELOG.md docs: deprecate worker-pool-memory in favor of core pool (#12) 2026-08-09 20:15:35 -05:00
COMPATIBILITY.md docs: COMPATIBILITY deprecation and core pool guidance (#13) 2026-08-09 20:15:46 -05:00
CONTRIBUTING.md chore: add LICENSE, SECURITY.md, CHANGELOG.md, CONTRIBUTING.md, COMPATIBILITY.md, .env.example, Makefile, .golangci.yml, Dockerfile, .dockerignore 2026-06-10 06:55:42 -05:00
Dockerfile chore: add LICENSE, SECURITY.md, CHANGELOG.md, CONTRIBUTING.md, COMPATIBILITY.md, .env.example, Makefile, .golangci.yml, Dockerfile, .dockerignore 2026-06-10 06:55:42 -05:00
go.mod chore: pin core@v0.5.0 and drop sibling replace 2026-08-09 16:08:10 -05:00
go.sum chore: pin core@v0.5.0 and drop sibling replace 2026-08-09 16:08:10 -05:00
LICENSE chore: add LICENSE, SECURITY.md, CHANGELOG.md, CONTRIBUTING.md, COMPATIBILITY.md, .env.example, Makefile, .golangci.yml, Dockerfile, .dockerignore 2026-06-10 06:55:42 -05:00
Makefile chore: add LICENSE, SECURITY.md, CHANGELOG.md, CONTRIBUTING.md, COMPATIBILITY.md, .env.example, Makefile, .golangci.yml, Dockerfile, .dockerignore 2026-06-10 06:55:42 -05:00
muxcore.json docs: deprecate worker-pool-memory in favor of core pool (#12) 2026-08-09 20:15:35 -05:00
README.md docs: deprecate worker-pool-memory in favor of core pool (#12) 2026-08-09 20:15:35 -05:00
ROADMAP.md docs: deprecate worker-pool-memory in favor of core pool (#12) 2026-08-09 20:15:35 -05:00
SECURITY.md chore: add LICENSE, SECURITY.md, CHANGELOG.md, CONTRIBUTING.md, COMPATIBILITY.md, .env.example, Makefile, .golangci.yml, Dockerfile, .dockerignore 2026-06-10 06:55:42 -05:00

Worker Pool Memory

Deprecated. Prefer MuxCore cores built-in worker pool. Do not invest in Phases 23 of this sidecar unless the built-in pool is proven insufficient. Kept in the official spool catalog only for compatibility (deprecated: true).

In-memory distributed worker pool sidecar for MuxCore (historical).

Schedules tasks across cluster nodes with failover reassignment. New deployments should use the core built-in pool instead of this module.

How It Works

Module submits task via WorkerPool.Submit()
        │
        ▼
worker-pool-memory enqueues task
        │
        ▼
Task assigned to available node (by capability match)
        │
        ▼
Node's executor module picks up task via gRPC
        │
        ▼
Executor calls back with result → status updated

Task Lifecycle

pending ──→ assigned ──→ running ──→ completed
                  │                   
                  └──→ running ──→ failed (retry if MaxRetries > 0)
                            
running ──→ pending (reassigned on node heartbeat timeout)

Executor Discovery

Worker modules implement contracts.Executor and register with capabilities matching the task types they handle. The worker pool discovers them via Registry.FindByCapability:

type Executor interface {
    CanHandle(taskType string) bool
    Execute(ctx context.Context, task WorkerTask) ([]byte, error)
}

Configuration

CLI Flags

Flag Default Description
--queue-capacity 10000 Maximum pending tasks
--heartbeat-timeout 30s Node heartbeat timeout before reassign
--max-retries 3 Default max retry attempts per task
--rebalance-interval 60s How often to check for idle nodes

Implementation

  • Registers with capability: "worker.pool"
  • Implements contracts.WorkerPool (Submit, Status, Cancel, List, Reassign)
  • In-memory priority queue (heap-based)
  • Watches cluster events for node liveness
  • Executor discovery via registry polling
  • Supports IdempotencyKey for exactly-once execution
  • Published events: worker.task.*