Struct rustyspanner::client::Client[][src]

pub struct Client { /* fields omitted */ }

Client for interacting with Cloud Spanner API.

Methods

impl Client
[src]

Initializes a new Client with a given project_id.

Arguments

  • project_id - This String represents the project id to work with. Note: Don't confuse the project id with the project name.

Return value

A Client connected to a specified project.

Project name to be used with Spanner APIs.

The project name is of form:

projects/{project_id}

Return value

A String representing the project name to be used with the Cloud Spanner Admin API RPC service.

Getter of project id.

Return value

A &String of the project id.

Helper for session-related API calls.

Helpers for session-related API calls.

List available instance configutations for the client's project.

See RPC docs

Arguments

  • page_size - (Optional) Maximum number of results to return.

  • page_token - (Optional) Token for fetching next page of results.

Return value

A ListInstanceConfigs struct with the result.

Factory to create a instance associated with this client.

Arguments

  • instance_id - The ID of the instance.

  • config_name - (Optional) Name of the instance configuration used to set up instance's cluster, in the form: projects/<project_id>/instanceConfigs/<config>. Required for instances which do not yet exist.

  • display_name - (Optional) The display name for the instance in the Cloud Console UI. (Must be between 4 and 30 characters.) If this value is not set in the constructor, will fall back to the instance ID.

  • node_count - (Optional) The number of nodes in the instance's cluster; used to set up the instance's cluster.

Return value

An Instance owned by this client.

List instances for the client's project.

See RPC docs

Arguments

  • filter - (Optional) Filter to select instances listed. See the ListIntancesRequest docs above for examples.

  • page_size - (Optional) Maximum number of results to return.

  • page_token - (Optional) Token for fetching next page of results.

Return value

A ListInstances struct with the result.

Trait Implementations

impl Debug for Client
[src]

Formats the value using the given formatter. Read more

Auto Trait Implementations

impl Send for Client

impl Sync for Client