Expand description
§Tauri Plugin Centrifugo
A Tauri plugin for real-time communication with Centrifugo server, built on the official
centrifuge-client SDK.
§Features
- Real-time Communication: WebSocket with HTTP-streaming fallback, proxies, OS TLS store
- JSON & Protobuf Support: Choose between JSON and Protobuf protocols
- Event-driven Architecture: Comprehensive event system for connection state and messages
- Channel Management: Subscribe/unsubscribe to channels dynamically
- Authentication: JWT token support for secure connections
- Cross-platform: Works on desktop and mobile platforms
§Usage
use tauri_plugin_centrifugo::init;
// fn main() {
// tauri::Builder::default()
// .plugin(init())
// .run(tauri::generate_context!())
// .expect("error while running tauri application");
// }§Architecture
The plugin consists of several modules:
commands: Tauri command handlers for frontend communicationcore: Core Centrifugo client logic and state managementmodels: Data structures for requests, responses, and configurationerror: Custom error types and error handling
§Dependencies
centrifuge-client: the official Centrifugo Rust SDKserde: Serialization/deserializationthiserror: Error handling utilitiesfutures-util: Async stream utilities
§License
MIT License
Re-exports§
pub use error::Result;pub use centrifuge;
Modules§
Functions§
- init
- Initialize the Centrifugo plugin for Tauri