Expand description
§tapped
A Rust wrapper for the tap ATProto sync utility.
Tap simplifies ATProto sync by handling the firehose connection, verification, backfill, and filtering. This crate provides an idiomatic async Rust interface to tap’s HTTP API and WebSocket event stream.
§Features
- Connect to an existing tap instance or spawn one as a subprocess
- Strongly-typed configuration with builder pattern
- Async event streaming with automatic acknowledgment
- Full HTTP API coverage for repo management and statistics
§Example
use tapped::{TapProcess, TapConfig, Result};
#[tokio::main]
async fn main() -> Result<()> {
let config = TapConfig::builder()
.database_url("sqlite://tap.db")
.build();
// Spawn tap and get a client
let process = TapProcess::spawn_default(config).await?;
let client = process.client()?;
// Check health
client.health().await?;
// Add repos to track
client.add_repos(&["did:plc:example1234567890abc"]).await?;
// Stream events
let mut receiver = client.channel().await?;
while let Ok(event) = receiver.recv().await {
// Event is automatically acknowledged when dropped
}
Ok(())
}Structs§
- Cursors
- Cursor positions.
- DidDocument
- A DID document.
- Event
Receiver - Receiver for events from a tap WebSocket channel.
- Identity
Event - An identity event from the tap stream.
- Received
Event - Wrapper around Event that includes the ack trigger.
- Record
Event - A record event from the tap stream.
- Repo
Info - Information about a tracked repository.
- Service
- A service in a DID document.
- TapClient
- HTTP client for interacting with a tap instance.
- TapConfig
- Configuration for a tap instance.
- TapConfig
Builder - Builder for
TapConfig. - TapProcess
- A running tap process.
- Verification
Method - A verification method in a DID document.
Enums§
- Account
Status - Account status.
- Error
- The error type for tapped operations.
- Event
- An event from the tap stream.
- LogLevel
- Log level for tap process.
- Record
Action - Action performed on a record.
- Repo
State - Repository sync state.
Type Aliases§
- Result
- A specialised Result type for tapped operations.