RedisConnection abstract class
The RedisConnection wraps the Socket, and provides an API to communicate to redis.
You instantiate a RedisConnection with:
RedisConnection.connect(connectionString)
.then((RedisConnection connection) {
// Use your connection
});
where connectionString
can be any of following:
'pass@host:port/db'
'pass@host:port'
'pass@host'
'host'
null
defaults to'localhost:6379/0'
abstract class RedisConnection { /// Create a new [RedisConnection] with given connectionString. static Future<RedisConnection> connect(String connectionString) => _RedisConnection.connect(connectionString); /// The connectionString from which the connection settings have been /// extruded. /// /// Once this string has been parsed, it isn't used anymore. String connectionString; /// Redis connection hostname String hostname; /// Redis connection password String password; /// Redis connection port int port; /// Redis database int db; /// Closes the connection. Future close(); Map get stats; Future select([ int db ]); /// Convenient method to send [String] commands. Receiver send(List<String> cmdWithArgs); /// Sends the commands already in binary. Receiver rawSend(List<List<int>> cmdWithArgs); }
Static Methods
Future<RedisConnection> connect(String connectionString) #
Create a new RedisConnection with given connectionString.
static Future<RedisConnection> connect(String connectionString) => _RedisConnection.connect(connectionString);
Properties
String connectionString #
The connectionString from which the connection settings have been extruded.
Once this string has been parsed, it isn't used anymore.
String connectionString
int db #
Redis database
int db
String hostname #
Redis connection hostname
String hostname
String password #
Redis connection password
String password
int port #
Redis connection port
int port
final Map stats #
Map get stats;