Skip to main content

Crate billdogeng

Crate billdogeng 

Source
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§

pub use flags::Flags;
pub use messaging::Messaging;
pub use surveys::Surveys;

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§

BilldogEng
The BilldogEng server SDK client.
BilldogEngError
Error returned when an API request ultimately fails (after retries) or the client is misconfigured.
BilldogEngOptions
Configuration for crate::BilldogEng. All fields have defaults via BilldogEngOptions::default.
DispatchParams
Parameters for crate::messaging::Messaging::dispatch.
FeatureFlagDefinition
A feature-flag definition returned by POST /feature-flag-definitions.
FlagEvalOptions
Options accepted by the feature-flag read methods.
FlagVariant
A single multivariate flag variant.
Llm
LLM observability client.
LlmTraceParams
Parameters for crate::llm::Llm::capture_trace.
MessagingScheduling
Scheduling block for a messaging dispatch.
MessagingTargeting
Targeting block for a messaging dispatch.
SurveyAnswer
A single survey answer. Mirrors the bdsurvey-submit answer shape.
SurveyContext
Optional context passed to survey lifecycle calls.
SurveyListItem
A survey summary returned by POST /bdsurvey-list.
TargetingRule
A single targeting rule. ALL rules must match for a flag to be ON.
WireEvent
The on-wire shape of a single analytics event (one element of the batch).

Enums§

FlagValue
The evaluated value of a feature flag.
Operator
A targeting rule operator.

Functions§

bucket_of
Deterministic 0..=99 bucket for a "{key}.{distinctId}" style seed.
murmurhash3
Compute the 32-bit murmurhash3 of key with seed 0.
murmurhash3_seed
Compute the 32-bit murmurhash3 of key with the given seed.

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.