Expand description
§billdogeng — Official BilldogEng server SDK for Rust.
Engagement suite for server-side use: Analytics + Feature Flags (remote + local evaluation) + Surveys (data API) + Messaging + LLM observability.
This crate mirrors the canonical Node reference implementation, idiomatically in Rust (synchronous API + a background flush thread).
use billdogeng::{BilldogEng, BilldogEngOptions, FlagEvalOptions};
let bd = BilldogEng::new("bd_test_xxx", BilldogEngOptions {
local_evaluation: true,
..Default::default()
});
bd.capture("user-123", "order_completed", Default::default(), Default::default());
let on = bd.is_feature_enabled("new_checkout", "user-123", &FlagEvalOptions::default());
bd.shutdown().ok();Re-exports§
Modules§
- flags
- Feature-flag client supporting both remote and local (server-side) evaluation.
- messaging
- Messaging dispatch (BillDog advantage over PostHog) — server-side delivery across push / email / sms / in-app / live-activity.
- surveys
- Surveys DATA API (no UI rendering). Wraps the
bdsurvey-*edge functions.
Structs§
- Billdog
Eng - The BilldogEng server SDK client.
- Billdog
EngError - Error returned when an API request ultimately fails (after retries) or the client is misconfigured.
- Billdog
EngOptions - Configuration for
crate::BilldogEng. All fields have defaults viaBilldogEngOptions::default. - Dispatch
Params - Parameters for
crate::messaging::Messaging::dispatch. - Feature
Flag Definition - A feature-flag definition returned by
POST /feature-flag-definitions. - Flag
Eval Options - Options accepted by the feature-flag read methods.
- Flag
Variant - A single multivariate flag variant.
- Llm
- LLM observability client.
- LlmTrace
Params - Parameters for
crate::llm::Llm::capture_trace. - Messaging
Scheduling - Scheduling block for a messaging dispatch.
- Messaging
Targeting - Targeting block for a messaging dispatch.
- Survey
Answer - A single survey answer. Mirrors the bdsurvey-submit answer shape.
- Survey
Context - Optional context passed to survey lifecycle calls.
- Survey
List Item - A survey summary returned by
POST /bdsurvey-list. - Targeting
Rule - A single targeting rule. ALL rules must match for a flag to be ON.
- Wire
Event - The on-wire shape of a single analytics event (one element of the batch).
Enums§
Functions§
- bucket_
of - Deterministic
0..=99bucket for a"{key}.{distinctId}"style seed. - murmurhash3
- Compute the 32-bit murmurhash3 of
keywith seed0. - murmurhash3_
seed - Compute the 32-bit murmurhash3 of
keywith the givenseed.
Type Aliases§
- Groups
- Map of group type → group key (e.g.
{ company: "acme", team: "core" }). - Properties
- Arbitrary JSON-serializable property bag.
- Result
- Convenience result alias.