#server #client #publish #help #events #namespaces #pikav

pikav-client

A client that help you publish to pikav server

48 releases (11 breaking)

0.20.14 Feb 27, 2024
0.20.11 Jan 22, 2024
0.20.7 Dec 25, 2023
0.20.5 Nov 27, 2023
0.10.1 Jun 19, 2022

#50 in #namespaces

Download history 61/week @ 2024-07-05 2/week @ 2024-07-12

63 downloads per month

Apache-2.0

15KB
306 lines

A client that help you publish to pikav server


Getting Started

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

#[tokio::main]
async fn main() -> std::io::Result<()> {
    let pikva_client = Client::new(ClientOptions {
        url: "http://127.0.0.1:6750".to_owned(),
        namespace: None,
    });

    client.publish(vec![Event::new(
            user.0,
            "todos/1",
            "Deleted",
            json!({
                "id": id.to_owned()
            }),
        )
        .unwrap()]);
}

Dependencies

~8–15MB
~216K SLoC