How wegoingprobyn/clusterservices works
This workspace is a Rust framework for cluster agents and services: plugins sample data and respond to commands, while the runtime engine manages service lifecycles and communicates with peers over a framed transport. The principal flow is service sampling, encoding and transport, then server-side handler processing; commands travel back through the engine to targeted services. The README is empty and source excerpts are partial, so links for unsampled capabilities are limited to relationships established by the API, protocol schema, and excerpts.
Main entry points: service.rs Service lifecycle · engine.rs Node engine · traits.rs Transport API · frame.rs Protocol frames
Components 20
Plugin API
- Service contracts
crates/core/api/src/service.rs - Sampler API
crates/core/api/src/sampler.rs - Handler API
crates/core/api/src/handler.rs - Command API
crates/core/api/src/command.rs - Wire encoding
crates/core/api/src/wire.rs
Runtime Engine
- Node engine
crates/runtime/engine/src/engine.rs - Service lifecycle
crates/runtime/engine/src/service.rs - Command routing
crates/runtime/engine/src/queue.rs - Peer sessions
crates/runtime/engine/src/peer.rs - Message chunks
crates/runtime/engine/src/chunk.rs - Plugin workers
crates/runtime/engine/src/worker.rs - Runtime stats
crates/runtime/engine/src/stats.rs
Peer Transport
- Transport API
crates/runtime/transport/src/traits.rs - Connection endpoints
crates/runtime/transport/src/endpoint.rs - Protocol frames
crates/runtime/transport/src/frame.rs - Wire schema
crates/runtime/transport/proto/frame.proto
Built-in Plugin
- Cgroup service
crates/plugins/cgroup/src/lib.rs
Other components
- Command issuer
- Remote peer
- Service-owned state
Connections 21
- Cgroup service → Service contracts: implements
- Cgroup service → Sampler API: samples via
- Node engine → Service lifecycle: manages
- Node engine → Transport API: connects through
- Node engine → Peer sessions: tracks peers
- Node engine → Command routing: dispatches commands
- Node engine → Runtime stats: updates counters
- Service lifecycle → Sampler API: runs samplers
- Service lifecycle → Handler API: invokes handlers
- Service lifecycle → Plugin workers: runs blocking work
- Service lifecycle → Wire encoding: encodes samples
- Service lifecycle → Command API: handles commands
- Handler API → Service-owned state: processes data
- Command issuer → Node engine: requests command
- Command routing → Peer sessions: targets peer
- Peer sessions → Transport API: sends and receives
- Transport API → Connection endpoints: opens connection
- Transport API → Protocol frames: transfers frames
- Protocol frames → Wire schema: follows schema
- Protocol frames → Message chunks: supports splitting
- Remote peer → Transport API: exchanges frames