Skip to main content

Crate libbeachcomber

Crate libbeachcomber 

Source
Expand description

§beachcomber-client

A lightweight, synchronous client for the beachcomber (comb) shell state daemon.

use beachcomber_client::{Client, CombResult};

let client = Client::new();
match client.get("git.branch", Some("/path/to/repo")) {
    Ok(CombResult::Hit { data, age_ms, stale }) => {
        println!("branch: {}", data.get_str("git.branch").unwrap_or("?"));
    }
    Ok(CombResult::Miss) => println!("not cached yet"),
    Err(e) => println!("error: {}", e),
}

Structs§

Client
A synchronous client for the beachcomber daemon.
ClientConfig
Configuration for the client.
CombData
Parsed response data from a provider.
Session
A persistent connection for multiple queries.

Enums§

CombError
Error type for client operations.
CombResult
Result of a cache query.

Functions§

socket_path
Find the beachcomber socket path.