Enum fred::types::RedisConfig [] [src]

pub enum RedisConfig {
    Centralized {
        host: String,
        port: u16,
        key: Option<String>,
        max_value_size: Option<usize>,
    },
    Clustered {
        hosts: Vec<(String, u16)>,
        key: Option<String>,
        max_value_size: Option<usize>,
    },
}

Connection configuration for the Redis server.

Variants

Fields of Centralized

The hostname or IP address of the Redis server.

The port on which the Redis server is listening.

An optional authentication key to use after connecting.

The maximum number of bytes that can be allocated for a value, or None for no limit.

Fields of Clustered

A vector of (Host, Port) tuples for nodes in the cluster. Only a subset of nodes in the cluster need to be provided here, the rest will be discovered via the CLUSTER NODES command.

An optional authentication key to use after connecting.

The maximum number of bytes that can be allocated for a value, or None for no limit.

Methods

impl RedisConfig
[src]

[src]

[src]

[src]

Create a centralized config with default settings for a local deployment.

[src]

Create a clustered config with the same defaults as specified in the create-cluster script provided by Redis.

[src]

Overwrite the auth key on this config.

[src]

Set the max size of values received over the socket, or None for no limit.

[src]

Read a copy of the max_value_size.

[src]

Check if the config is for a clustered Redis deployment.

Trait Implementations

impl Clone for RedisConfig
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for RedisConfig
[src]

[src]

Formats the value using the given formatter.

impl Eq for RedisConfig
[src]

impl PartialEq for RedisConfig
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Default for RedisConfig
[src]

[src]

Returns the "default value" for a type. Read more