#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

#8 in #event

Download history 52/week @ 2024-09-21 16/week @ 2024-09-28

1,031 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

~9–16MB
~202K SLoC