krossbar-bus-hub
Krossbar bus hub
The binary acts as a hub for service connections. On request it makes a UDS pair and sends corresponding sockets to each of the peers, which afterward use the pair for communication. The only known point of rendezvous fot the services is the hub socket.
The hub uses [krossbar_bus_common::DEFAULT_HUB_SOCKET_PATH] for hub socket path and [krossbar_bus_common::DEFAULT_SERVICE_FILES_DIR] for service files dir by default. These can be changed using cmd args.
Created socket has 0o666 file permission to allow service connections.
Service files
During service registration and later for all connection requests the hub uses permission system to check if the service is allowed to do what it's trying to do.
Service file filename identifies client service name. The file itself contains executable glob for which it's allowed to register the service, and a list of client names, who are allowed to connect to the service.
Basic service file com.example.echo.service may look like the following:
See lib examples directory for service files examples.
Building
Build manually or use cargo install krossbar-bus-hub to install.
Usage: