Skip to main content

Crate pulse_client

Crate pulse_client 

Source
Expand description

Official Rust client for StreamFlow Pulse — the AI Agent Platform.

§Quick start

use pulse_client::PulseClient;

#[tokio::main]
async fn main() -> Result<(), pulse_client::PulseError> {
    let client = PulseClient::builder()
        .base_url("http://localhost:9090")
        .build()?;

    client.auth().login("alice", "secret").await?;

    for pipeline in client.pipelines().list().await? {
        println!("{}", pipeline["name"]);
    }
    Ok(())
}

§Surface

Mirrors the Python (pulse-py), JavaScript (@olsisoft/pulse-client), Java (com.streamflow:pulse-client) and Go (github.com/olsisoft/pulse-go) SDKs 1:1:

§Wire format

Every method corresponds 1:1 to an endpoint in the Pulse OpenAPI 3.1 spec (streamflow-pulse/src/main/resources/openapi/openapi.yaml). Drift caught at PR time by the in-tree spec invariant tests (B-103).

Modules§

aggs
Aggregator factory namespace.
windows
Window-spec factory namespace.

Structs§

AgentsResource
AuthResource
BranchSpec
One branch of StreamBuilder::branch.
BroadcastJoinOptions
Options for StreamBuilder::broadcast_join.
CdcJoinOptions
Options for StreamBuilder::cdc_join.
CepOptions
Options for StreamBuilder::cep.
ConnectorsResource
client.connectors() — the connector catalogue, the same list the Pipeline Studio palette and pulse connectors list show. Each entry is {subType, displayName, configFields}; use the subType as a sink/source node type in a pipeline definition deployed via client.pipelines(). Bridged connectors appear only when the enterprise bridge JAR is on the server’s classpath.
DuplexChannel
An open duplex session.
DuplexOutput
An agent output event received over the duplex channel.
EnrichAsyncOptions
Options for StreamBuilder::enrich_async.
EventsResource
client.events() — accessor for the SSE event stream.
EventsStream
Stream<Item = Result<Value, PulseError>> — yields parsed SSE events.
ExtractOptions
B-109 — options for StreamBuilder::extract. instruction + schema required.
IQQueryOptions
Optional inputs for IQResource::query.
IQResource
client.iq() — accessor for Interactive Queries.
IQScanOptions
Optional range bounds + page size for IQResource::scan and IQResource::list_keys.
MapLlmOptions
B-109 — options for StreamBuilder::map_llm. output_field is required.
MapOptions
Options for StreamBuilder::map.
McpCallOptions
B-109 Phase 2 — options for StreamBuilder::mcp_call.
MlPredictOptions
B-112 — options for StreamBuilder::ml_predict. model, input_fields and output_field are required.
ModelUpload
B-112 — describes a model upload to ModelsResource::upload.
ModelsResource
client.models() — B-112 embedded ML model registry.
PipelinesResource
PulseClient
Async HTTP client for the Pulse REST API.
PulseClientBuilder
Fluent builder for PulseClient.
StreamBuilder
Fluent builder for a Pulse streaming pipeline.
StreamsResource
client.streams() — compile + deploy StreamBuilder pipelines.
TemplatesResource
UsersResource
WindowOptions
Options for StreamBuilder::window.
WindowSpec
A window specification. Compiled to the string form the server expects.

Enums§

PulseError
The single error type returned by every PulseClient method.
Value
Represents any valid JSON value.

Constants§

VERSION
Current SDK version (matches Cargo.toml and the Pulse server it targets).

Functions§

derive_ws_url
Builds the duplex WebSocket URL from the client’s REST base_url.
iq_and
Builds an AND filter combining all children.
iq_leaf
Builds a leaf filter node: {"field": ..., "op": ..., "value": ...}. Pass an empty op to omit it (e.g. for an exists-style test where the field’s mere presence suffices).
iq_not
Builds a NOT filter negating its child.
iq_or
Builds an OR filter combining all children.