No description
  • Go 87.3%
  • Makefile 10.3%
  • Dockerfile 2.4%
Find a file
zemdregon a544399463
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 docker/setup-buildx-action to v4
Self-hosted CI workflows only.
2026-08-10 18:13:23 -05:00
.github/workflows chore(deps): bump docker/setup-buildx-action to v4 2026-08-10 18:13:23 -05:00
cmd/module chore: add LICENSE and refresh docs/CI 2026-07-22 19:09:19 -05:00
deploy feat: initial implementation 2026-06-13 14:24:34 -05:00
internal Add SettingsProvider for watch stream buffer (v0.1.1). 2026-08-10 04:29:25 -05:00
proto/muxcore/configwatcher/v1 feat: initial implementation 2026-06-13 14:24:34 -05:00
.dockerignore feat: initial implementation 2026-06-13 14:24:34 -05:00
.env.example Add SettingsProvider for watch stream buffer (v0.1.1). 2026-08-10 04:29:25 -05:00
.gitignore feat: initial implementation 2026-06-13 14:24:34 -05:00
CHANGELOG.md Add SettingsProvider for watch stream buffer (v0.1.1). 2026-08-10 04:29:25 -05:00
COMPATIBILITY.md docs: cut v0.1.0 — config.watcher WatchChanges + admin Report (#5) 2026-08-09 20:22:26 -05:00
CONTRIBUTING.md chore: add LICENSE and refresh docs/CI 2026-07-22 19:09:19 -05:00
Dockerfile feat: initial implementation 2026-06-13 14:24:34 -05:00
go.mod Add SettingsProvider for watch stream buffer (v0.1.1). 2026-08-10 04:29:25 -05:00
go.sum Add SettingsProvider for watch stream buffer (v0.1.1). 2026-08-10 04:29:25 -05:00
LICENSE chore: add LICENSE and refresh docs/CI 2026-07-22 19:09:19 -05:00
Makefile feat: initial implementation 2026-06-13 14:24:34 -05:00
muxcore.json Add SettingsProvider for watch stream buffer (v0.1.1). 2026-08-10 04:29:25 -05:00
README.md chore: add LICENSE and refresh docs/CI 2026-07-22 19:09:19 -05:00
SECURITY.md feat: initial implementation 2026-06-13 14:24:34 -05:00

Config Watcher

Go Version License: GPL-3.0

Notifies modules when infrastructure services change at runtime.

A MuxCore sidecar module that provides the config.watcher capability. Modules subscribe by capability string via WatchChanges (server-streaming gRPC) and receive events when a matching module registers or unregisters. Events are pushed by core or other modules through the ReportModuleChange admin RPC.


How It Works

Module ──→ WatchChanges(stream) ──→ config-watcher
                                         ↑
Core/Admin ──→ ReportModuleChange ────────┘

WatchChanges (server-streaming)

Clients call WatchChanges with a capability string. The server keeps the stream open and pushes WatchChangesResponse events as they arrive.

ReportModuleChange (unary admin)

Core or another module calls ReportModuleChange with an event type, module ID, and capability. The module fans out the event to all watchers matching that capability (plus wildcard watchers watching "").


Configuration

Environment Variables

Variable Default Description
CONFIG_WATCHER_GRPC_ADDR :9611 gRPC listen address
MUXCORE_GRPC_ADDR Core mesh address
MUXCORE_MODULE_ID config-watcher Module identity
MUXCORE_INSECURE_DISABLE_TLS Disable TLS to core (true, dev only)

Quick Start

# Build
make build

# Run against local core (dev mode)
export MUXCORE_INSECURE_DISABLE_TLS=true
./config-watcher --muxcore-mesh-addr localhost:9090

Deployment

Docker

make docker
docker run -d --restart=unless-stopped \
  -e MUXCORE_GRPC_ADDR=core:9090 \
  ghcr.io/muxcore-media/config-watcher:latest

docker-compose

docker compose -f deploy/docker-compose.yml up

systemd

sudo cp deploy/systemd/muxcore-config-watcher.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now muxcore-config-watcher

Development

make build   # compile
make test    # run tests
make lint    # golangci-lint
make fmt     # format code
make proto   # regenerate admin proto

Implementation

  • Registers with capability: "config.watcher"
  • Declares contract ConfigWatcher (v0.4.0); serves gRPC (not in-process OnChange)
  • Exposes two gRPC services:
    • ConfigWatcherService.WatchChanges (server-streaming)
    • ConfigWatcherAdminService.ReportModuleChange (unary)
  • Event fan-out per capability with non-blocking channel sends

License

GPL-3.0