Skip to main content

Crate confish

Crate confish 

Source
Expand description

Official Rust SDK for confish.

§Quick start

use confish::Client;
use serde::Deserialize;

#[derive(Deserialize, Debug)]
struct MyConfig {
    site_name: String,
    max_upload_mb: u32,
    maintenance_mode: bool,
}

let client = Client::builder("env_id", "confish_sk_...").build()?;
let config: MyConfig = client.config().fetch().await?;
println!("{config:?}");

Modules§

webhook
Webhook signature verification.

Structs§

Action
An action returned by the actions API.
ActionContext
Passed to handlers so they can append progress notes to the action’s timeline.
ActionUpdate
A single timeline entry on an Action.
Actions
Wraps the /c/{env}/actions endpoints.
Client
Asynchronous client for the confish API.
ClientBuilder
Builder for Client.
Config
Wraps the /c/{env} configuration endpoints.
ConsumeOptions
Configuration for Actions::consume.
Feed
Wraps the /c/{env}/feeds/{slug}/items endpoints for a single feed.
FeedItem
An item returned by the feeds API.
FeedItemInput
A single item in a Feed::replace payload.
FeedReplaceResult
Counts returned by Feed::replace.
LogEntryInput
A single entry in a Logs::write_batch payload.
Logs
Wraps the /c/{env}/log and /c/{env}/logs endpoints, with one convenience method per level plus batch writing.
TracingGuardtracing
Keeps the background sender alive and flushes it on shutdown — hold on to it for as long as the layer is in use (the tracing-appender WorkerGuard pattern).
TracingLayertracing
A tracing_subscriber::Layer that ships tracing events to confish as log entries.
TracingLayerBuildertracing
Builder for TracingLayer.

Enums§

ActionStatus
An action’s lifecycle status.
Error
All errors the SDK can return.
LogLevel
Log severity levels accepted by the logging API (the full RFC 5424 set).

Constants§

DEFAULT_BASE_URL
The default API base URL (https://confi.sh).

Type Aliases§

ErrorCallback
Callback invoked when listing fails, when ack fails (other than 409), or when a handler returns an error. The second parameter is None if the failure happened before an action was picked up (e.g. listing failed).
Result