Skip to main content

Crate live_feed

Crate live_feed 

Source
Expand description

§live-feed

Publisher SDK for advertising and serving live data feeds. A publisher declares one or more named feeds, builds a manifest consumers can browse, and accepts subscription requests against SubscriptionDescriptors. Consumers are served by the companion live-stream crate.

§What 0.1.0 ships

  • FeedDescriptorBuilder - builder for a feed entry.
  • FeedManifestBuilder - aggregate descriptors into a manifest.
  • ManifestRegistry - keep a live registry of declared feeds and produce a manifest snapshot, with JSON round-trip.
  • LocalPublisher - in-memory publisher that validates incoming subscriptions against the registry’s capabilities. Useful for tests, examples, and as a reference implementation of the accept/reject contract.
  • ValidationError - reasons a descriptor or subscription is refused, plus the negotiate_subscription helper that exposes the validation engine on its own.

§What 0.2.x adds

  • LiveFeedServer - bind to one or more transports.
  • FeedPublisher - typed handle a producer pushes batches into.
  • register_*_source - declarative entry points for common source shapes (WebSocket-JSON, file-replay, etc.).

Re-exports§

pub use builder::FeedDescriptorBuilder;
pub use builder::FeedManifestBuilder;
pub use local::LocalPublisher;
pub use registry::ManifestRegistry;
pub use validate::NegotiatedSubscription;
pub use validate::ValidationError;
pub use validate::negotiate_subscription;
pub use validate::validate_descriptor;

Modules§

builder
Builders for FeedDescriptor and FeedManifest.
local
In-memory publisher subscribe-validation contract.
registry
Live registry of declared feeds with manifest snapshots.
validate
Validation for descriptors and subscription requests.

Structs§

Capabilities
What the publisher is willing to do server-side when accepting a subscription.
Endpoint
Identifies where a consumer should connect to read a feed.
FeedDescriptor
Single named live feed, as advertised by a publisher.
FeedManifest
Snapshot of everything a publisher currently exposes.
FieldSpec
One field in a WireSchema.
Sampling
Optional sampling policy that can be applied server-side.
SubscribeAck
Successful subscription. Tells the consumer where to read from and what to expect.
SubscribeError
Reason a subscription was refused.
SubscriptionDescriptor
Request to open one feed.
TransportPreference
Ordered transport preference list, most-preferred first.
WireSchema
Ordered list of fields that make up a feed’s schema.

Enums§

Error
FilterExpr
Server-side filter expression.
FormatPreference
Format the publisher will emit batches in once a subscription is accepted.
SubscribeErrorCode
SubscribeResponse
Publisher’s reply to a SubscriptionDescriptor.
TransportTag
One of the transports a feed can be exposed over.

Constants§

CONTROL_TAG_FEEDS
Control-channel tag used by a consumer to request the manifest.
CONTROL_TAG_SUBSCRIBE
Control-channel tag used by a consumer to open a subscription.
PROTOCOL_VERSION
Wire protocol version negotiated between publishers and consumers.

Type Aliases§

Result