pub struct SentinelClient { /* private fields */ }
Available on crate feature sentinel-client only.
Expand description

A struct for interacting directly with Sentinel nodes.

This struct will not communicate with Redis servers behind the sentinel interface, but rather with the sentinel nodes themselves. Callers should use the RedisClient interface with a ServerConfig::Sentinel for interacting with Redis services behind a sentinel layer.

See the sentinel API docs for more information.

Implementations

Create a new client instance without connecting to the sentinel node.

Listen for reconnection notifications.

This function can be used to receive notifications whenever the client successfully reconnects.

A reconnection event is also triggered upon first connecting to the server.

Trait Implementations

Create an ACL user with the specified rules or modify the rules of an existing user. Read more

When Redis is configured to use an ACL file (with the aclfile configuration option), this command will reload the ACLs from the file, replacing all the current ACL rules with the ones defined in the file. Read more

When Redis is configured to use an ACL file (with the aclfile configuration option), this command will save the currently defined ACLs from the server memory to the ACL file. Read more

The command shows the currently active ACL rules in the Redis server. Read more

The command shows a list of all the usernames of the currently configured users in the Redis ACL system. Read more

The command returns all the rules defined for an existing ACL user. Read more

Delete all the specified ACL users and terminate all the connections that are authenticated with such users. Read more

The command shows the available ACL categories if called without arguments. If a category name is given, the command shows all the Redis commands in the specified category. Read more

Generate a password with length bits, returning the password. Read more

Return the username the current connection is authenticated with. New connections are authenticated with the “default” user. Read more

Read count recent ACL security events. Read more

Clear the ACL security events logs. Read more

Request for authentication in a password-protected Redis server. Returns ok if successful. Read more

Switch to a different protocol, optionally authenticating in the process. Read more

Return the ID of the current connection. Read more

Read the connection IDs for the active connections to each server. Read more

Force update the client’s sentinel nodes list if using the sentinel interface. Read more

The command returns information and statistics about the current client connection in a mostly human readable format. Read more

Close a given connection or set of connections. Read more

The CLIENT LIST command returns information and statistics about the client connections server in a mostly human readable format. Read more

The CLIENT GETNAME returns the name of the current connection as set by CLIENT SETNAME. Read more

Assign a name to the current connection. Read more

CLIENT PAUSE is a connections control command able to suspend all the Redis clients for the specified amount of time (in milliseconds). Read more

CLIENT UNPAUSE is used to resume command processing for all clients that were paused by CLIENT PAUSE. Read more

The CLIENT REPLY command controls whether the server will reply the client’s commands. The following modes are available: Read more

This command can unblock, from a different connection, a client blocked in a blocking operation, such as for instance BRPOP or XREAD or WAIT. Read more

A convenience function to unblock any blocked connection on this client.

The unique ID identifying this client and underlying connections. Read more

Read the config used to initialize the client.

Read the reconnect policy used to initialize the client.

Read the RESP version used by the client when communicating with the server.

Whether or not the client has a reconnection policy.

Whether or not the client will automatically pipeline commands.

Update the internal PerformanceConfig in place with new values.

Read the state of the underlying connection(s). Read more

Whether or not the client has an active connection to the server(s).

Connect to the Redis server with an optional reconnection policy. Read more

Wait for the client to connect to the server, or return an error if the initial connection cannot be established. If the client is already connected this future will resolve immediately. Read more

Listen for protocol and connection errors. This stream can be used to more intelligently handle errors that may not appear in the request-response cycle, and so cannot be handled by response futures. Read more

Close the connection to the Redis server. The returned future resolves when the command has been written to the socket, not when the connection has been fully closed. Some time after this future resolves the future returned by connect will resolve which indicates that the connection has been fully closed. Read more

Shut down the server and quit the client. Read more

Ping the Redis server. Read more

Read info about the server. Read more

Run a custom command that is not yet supported via another interface on this client. This is most useful when interacting with third party modules or extensions. Read more

Run a custom command similar to custom, but return the response frame directly without any parsing. Read more

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Return a future that will ping the server on an interval. Read more

Read the number of request redeliveries. Read more

Read and reset the number of request redeliveries.

Read the number of buffered commands that have not yet been sent to the server.

Available on crate feature metrics only.

Read latency metrics across all commands. Read more

Available on crate feature metrics only.

Read and consume latency metrics, resetting their values afterwards.

Available on crate feature metrics only.

Read network latency metrics across all commands. Read more

Available on crate feature metrics only.

Read and consume network latency metrics, resetting their values afterwards.

Available on crate feature metrics only.

Read request payload size metrics across all commands.

Available on crate feature metrics only.

Read and consume request payload size metrics, resetting their values afterwards.

Available on crate feature metrics only.

Read response payload size metrics across all commands.

Available on crate feature metrics only.

Read and consume response payload size metrics, resetting their values afterwards.

Listen for (channel, message) tuples on the publish-subscribe interface. Keyspace events are not sent on this interface. Read more

Listen for keyspace and keyevent notifications on the publish subscribe interface. Read more

Subscribe to a channel on the PubSub interface, returning the number of channels to which the client is subscribed. Read more

Unsubscribe from a channel on the PubSub interface, returning the number of channels to which hte client is subscribed. Read more

Subscribes the client to the given patterns. Read more

Unsubscribes the client from the given patterns, or from all of them if none is given. Read more

Publish a message on the PubSub interface, returning the number of clients that received the message. Read more

Check if the current Sentinel configuration is able to reach the quorum needed to failover a master, and the majority needed to authorize the failover.

Force Sentinel to rewrite its configuration on disk, including the current Sentinel state.

Force a failover as if the master was not reachable, and without asking for agreement to other Sentinels.

Return the ip and port number of the master with that name.

Return cached INFO output from masters and replicas.

Show the state and info of the specified master.

Show a list of monitored masters and their state.

Start Sentinel’s monitoring. Read more

Return the ID of the Sentinel instance.

This command returns information about pending scripts.

Stop Sentinel’s monitoring. Read more

Show a list of replicas for this master, and their state.

Show a list of sentinel instances for this master, and their state.

Set Sentinel’s monitoring configuration. Read more

This command simulates different Sentinel crash scenarios.

This command will reset all the masters with matching name.

Get the current value of a global Sentinel configuration parameter. The specified name may be a wildcard, similar to the Redis CONFIG GET command.

Set the value of a global Sentinel configuration parameter.

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

Converts self into T using Into<T>. Read more

Converts self into a target type. Read more

Causes self to use its Binary implementation when Debug-formatted.

Causes self to use its Display implementation when Debug-formatted. Read more

Causes self to use its LowerExp implementation when Debug-formatted. Read more

Causes self to use its LowerHex implementation when Debug-formatted. Read more

Causes self to use its Octal implementation when Debug-formatted.

Causes self to use its Pointer implementation when Debug-formatted. Read more

Causes self to use its UpperExp implementation when Debug-formatted. Read more

Causes self to use its UpperHex implementation when Debug-formatted. Read more

Returns the argument unchanged.

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

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

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Pipes by value. This is generally the method you want to use. Read more

Borrows self and passes that borrow into the pipe function. Read more

Mutably borrows self and passes that borrow into the pipe function. Read more

Borrows self, then passes self.borrow() into the pipe function. Read more

Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more

Borrows self, then passes self.as_ref() into the pipe function.

Mutably borrows self, then passes self.as_mut() into the pipe function. Read more

Borrows self, then passes self.deref() into the pipe function.

Mutably borrows self, then passes self.deref_mut() into the pipe function. Read more

Pipes a value into a function that cannot ordinarily be called in suffix position. Read more

Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more

Pipes a dereference into a function that cannot normally be called in suffix position. Read more

Pipes a mutable dereference into a function that cannot normally be called in suffix position. Read more

Pipes a reference into a function that cannot ordinarily be called in suffix position. Read more

Pipes a mutable reference into a function that cannot ordinarily be called in suffix position. Read more

Should always be Self

Immutable access to a value. Read more

Mutable access to a value. Read more

Immutable access to the Borrow<B> of a value. Read more

Mutable access to the BorrowMut<B> of a value. Read more

Immutable access to the AsRef<R> view of a value. Read more

Mutable access to the AsMut<R> view of a value. Read more

Immutable access to the Deref::Target of a value. Read more

Mutable access to the Deref::Target of a value. Read more

Calls .tap() only in debug builds, and is erased in release builds.

Calls .tap_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_borrow() only in debug builds, and is erased in release builds. Read more

Calls .tap_borrow_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_ref() only in debug builds, and is erased in release builds. Read more

Calls .tap_ref_mut() only in debug builds, and is erased in release builds. Read more

Calls .tap_deref() only in debug builds, and is erased in release builds. Read more

Calls .tap_deref_mut() only in debug builds, and is erased in release builds. Read more

Provides immutable access for inspection. Read more

Calls tap in debug builds, and does nothing in release builds.

Provides mutable access for modification. Read more

Calls tap_mut in debug builds, and does nothing in release builds.

Provides immutable access to the reference for inspection.

Calls tap_ref in debug builds, and does nothing in release builds.

Provides mutable access to the reference for modification.

Calls tap_ref_mut in debug builds, and does nothing in release builds.

Provides immutable access to the borrow for inspection. Read more

Calls tap_borrow in debug builds, and does nothing in release builds.

Provides mutable access to the borrow for modification.

Calls tap_borrow_mut in debug builds, and does nothing in release builds. Read more

Immutably dereferences self for inspection.

Calls tap_deref in debug builds, and does nothing in release builds.

Mutably dereferences self for modification.

Calls tap_deref_mut in debug builds, and does nothing in release builds. Read more

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)

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

Converts the given value to a String. Read more

Attempts to convert self into T using TryInto<T>. Read more

Attempts to convert self into a target type. 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

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