Skip to content

Latest commit

 

History

History
 
 

README.md

Channel Manager

A Rust application for managing SLIM channels and participants. The Channel Manager creates and maintains SLIM sessions (channels) and handles participant invitations based on a configuration file.

Overview

The Channel Manager:

  • Connects to a SLIM node and creates channels defined in the configuration
  • Invites participants to channels automatically on startup
  • Exposes a gRPC API for dynamic channel and participant management

Building

cargo build --release

Configuration

Create a YAML configuration file (see example-channel-manager-config.yaml):

channel-manager:
  # Connection configuration for the SLIM data-plane node.
  # Transport is inferred from the endpoint scheme:
  #   ws://, wss://      → websocket (TLS when wss)
  #   http://, https://, bare host:port → grpc
  slim-connection:
    endpoint: "http://127.0.0.1:46357"
    tls:
      insecure: true

  # gRPC service address for accepting channel-manager commands.
  api-server:
    endpoint: "127.0.0.1:10356"
    tls:
      insecure: true

  # Name of the channel manager in SLIM
  local-name: "agntcy/otel/channel-manager"

  # Shared secret for the SLIM app identity.
  auth:
    type: shared_secret
    secret: "your-shared-secret-here"

  # Channels to create on startup.
  channels:
    - name: "agntcy/otel/channel"
      participants:
        - "agntcy/otel/exporter-traces"
        - "agntcy/otel/receiver"
      mls-enabled: true

Running

Start the channel manager with a configuration file:

./channel-manager --config-file config.yaml

Channel Manager CTL (cmctl)

A command-line client for interacting with the Channel Manager gRPC service.

Usage

cmctl [OPTIONS] <COMMAND>

Options

  • --server <ADDRESS>: Simple gRPC server address (default: http://localhost:10356)
  • --client-config <FILE>: Path to a YAML file with full gRPC client configuration (TLS, auth, keepalive, proxy, etc.). The Channel Manager API is gRPC, so websocket transport is not supported for cmctl. When provided, --server is ignored.
  • --disable-mls: Disable MLS for channel creation (MLS is enabled by default)

Available Commands

Create a new channel

cmctl create-channel org/ns/channel

Create a channel with MLS disabled:

cmctl --disable-mls create-channel org/ns/channel

Delete a channel

cmctl delete-channel org/ns/channel

Add a participant to a channel

cmctl add-participant org/ns/channel agntcy/ns/participant

Remove a participant from a channel

cmctl delete-participant org/ns/channel agntcy/ns/participant

List all channels

cmctl list-channels

List participants in a channel

cmctl list-participants org/ns/channel

Examples

Connect to a different server:

cmctl --server "http://192.168.1.100:10356" list-channels

Connect using full client config (with TLS, auth, etc.):

cmctl --client-config client-config.yaml list-channels

Example client-config.yaml:

endpoint: "https://channel-manager.example.com:10356"
tls:
  insecure: false
  ca_file: "/path/to/ca.pem"
auth:
  type: static_jwt
  token_file: "/path/to/token"
keepalive:
  tcp_keepalive: "60s"
  http2_keepalive: "60s"
  timeout: "10s"

Create a channel and add participants:

# Create channel with MLS enabled (default)
cmctl create-channel org/ns/team-chat

# Add participants
cmctl add-participant org/ns/team-chat org/ns/participant-1
cmctl add-participant org/ns/team-chat org/ns/participant-2

# List participants
cmctl list-participants org/ns/team-chat