Module: Valkey::Commands::Connection
- Included in:
- Valkey::Commands
- Defined in:
- lib/valkey/commands/connection.rb
Overview
This module contains commands related to connection management.
Instance Method Summary collapse
-
#auth(*args) ⇒ String
Authenticate to the server.
-
#echo(value) ⇒ String
Echo the given string.
-
#ping(message = nil) ⇒ String
Ping the server.
-
#quit ⇒ String
Close the connection.
-
#select(db) ⇒ String
Change the selected database for the current connection.
Instance Method Details
#auth(*args) ⇒ String
Authenticate to the server.
13 14 15 16 |
# File 'lib/valkey/commands/connection.rb', line 13 def auth(*args) # TODO: # send_command([:auth, *args]) end |
#echo(value) ⇒ String
Echo the given string.
31 32 33 34 |
# File 'lib/valkey/commands/connection.rb', line 31 def echo(value) # TODO: # send_command([:echo, value]) end |
#ping(message = nil) ⇒ String
Ping the server.
22 23 24 25 |
# File 'lib/valkey/commands/connection.rb', line 22 def ping( = nil) # TODO: # send_command([:ping, message].compact) end |
#quit ⇒ String
Close the connection.
48 49 50 51 52 53 54 55 56 |
# File 'lib/valkey/commands/connection.rb', line 48 def quit # TODO: # synchronize do |client| # client.call_v([:quit]) # rescue ConnectionError # ensure # client.close # end end |
#select(db) ⇒ String
Change the selected database for the current connection.
40 41 42 43 |
# File 'lib/valkey/commands/connection.rb', line 40 def select(db) # TODO: # send_command(RequestType::SELECT, [db.to_s]) end |