Module client

Module client 

Source
👎Deprecated since 0.21.1: This crate has been renamed to s2-sdk. Please update your Cargo.toml to use s2-sdk instead.
Expand description

SDK client implementation.

The module defines three clients:

OperationsAPI Service
ClientAccount level operationsAccountService
BasinClientBasin level operationsBasinService
StreamClientStream level operationsStreamService

To interact with any client, you need an authentication token which can be generated by the the web console at s2.dev. This token is passed to the client via a ClientConfig.

Along with the authentication token, a ClientConfig defines other request parameters such as timeouts, S2 endpoints, etc.

A client can be created using the corresponding new() method. To avoid creating multiple connections to each service, Client::basin_client can be used to create a BasinClient and BasinClient::stream_client can be used to create a StreamClient.

Note: Even though the client creation operation is cheap, a BasinClient should preferably be stored instead of using Client::basin_client multiple times as the account endpoint might vary from the basin endpoint creating a new connection each time the request is sent. See S2Endpoints.

Structs§

BasinClientDeprecated
Client for basin-level operations.
ClientDeprecated
Client for account-level operations.
ClientConfigDeprecated
Client configuration.
S2EndpointsDeprecated
Endpoints for the S2 environment.
StreamClientDeprecated
Client for stream-level operations.

Enums§

AppendRetryPolicyDeprecated
Retry policy for append requests.
BasinEndpointDeprecated
Endpoint for connecting to an S2 basin.
ClientErrorDeprecated
Error from client operations.
S2CloudDeprecated
S2 cloud environment to connect with.