pikav

Crates.iopikav
lib.rspikav
version0.20.14
sourcesrc
created_at2022-06-16 21:22:17.67915
updated_at2024-02-27 04:01:49.348577
descriptionA library that help you send event to client with topic subscription
homepagehttps://pikav.timada.co
repositoryhttps://github.com/timayz/pikav
max_upload_size
id607670
size14,255
(snapiz)

documentation

https://docs.rs/pikav

README

A library that help you send event to client with topic subscription


Getting Started

use serde_json::json;
use pikav_client::{Client, ClientOptions, Event};

#[tokio::main]
async fn main() -> std::io::Result<()> {
    let pikav = Pikav::new();

    let filter = TopicFilter::new("todos/+")?;

    pikav.subscribe(SubscribeOptions {
            filter,
            user_id: "xx-user-id-xx",
            client_id: "xx-client-id-xx",
        })
        .ok();
}
Commit count: 149

cargo fmt