Struct nakadion::api::ApiClient[][src]

pub struct ApiClient { /* fields omitted */ }
Expand description

A client to connect to the API of Nakadi.

The actual HTTP client is pluggable via the DispatchHttpRequest trait.

The ApiClient does retries with exponential backoff and jitter except for the following trait methods:

  • SubscriptionApi::request_stream
  • SubscriptionApi::commit_cursors
  • PublishApi::publish_events_batch

on_retry

A closure to be called before a retry. The error which caused the retry and the time until the retry will be made is passed. This closure overrides the current one and will be used for all subsequent clones of this instance. This allows users to give context on the call site.

Implementations

👎 Deprecated since 0.28.12:

misleading name. builder is just the empty default. use default_builder

Get a default builder

There are also methods to get a Builder which is initialized from the environment:

  • Builder::builder_from_env
  • Builder::builder_from_env_prefixed

Get a builder filled from the environment

Values are filled from prefixed environment variables

Get a builder filled from the environment

Values must be prefixed with NAKADION

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Deletes an EventType identified by its name. Read more

Used when a consumer wants to know how far behind in the stream its application is lagging. Read more

Lists the Partitions for the given event-type. Read more

Publishes a batch of Events of this EventType. All items must be of the EventType identified by name. Read more

Returns a list of all registered EventTypes

See also Nakadi Manual

Creates a new EventType.

See also Nakadi Manual

Deletes an EventType identified by its name.

See also Nakadi Manual

Returns the EventType identified by its name. Read more

Updates the EventType identified by its name. Read more

This endpoint creates a subscription for EventTypes.

See also Nakadi Manual

Returns a subscription identified by id.

See also Nakadi Manual

This endpoint only allows to update the authorization section of a subscription.

All other properties are immutable. This operation is restricted to subjects with administrative role. This call captures the timestamp of the update request.

See also Nakadi Manual

Deletes a subscription.

See also Nakadi Manual

Exposes the currently committed offsets of a subscription.

See also Nakadi Manual

Reset subscription offsets to specified values.

See also Nakadi Manual

Lists all subscriptions that exist in a system. Read more

Exposes statistics of specified subscription. Read more

Endpoint for committing offsets of the subscription. Read more

Starts a new stream for reading events from this subscription. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The alignment of pointer.

The type for initializers.

Initializes a with the given initializer. Read more

Dereferences the given pointer. Read more

Mutably dereferences the given pointer. Read more

Drops the object pointed to by the given pointer. Read more

Resets all cursors of the given subscription to CursorOffset::Begin

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more