|
1 | 1 | """ |
2 | | - Transport module for Redis.jl abstractes the connection to the Redis server. |
3 | | -
|
4 | | -Each transportimplementation must provide the following methods: |
5 | | -- `read_line(t::RedisTransport)`: read one line from the transport, similar to `readline` |
6 | | -- `read_nbytes(t::RedisTransport, m::Int)`: read `m` bytes from the transport, similar to `read` |
7 | | -- `write_bytes(t::RedisTransport, b::Vector{UInt8})`: write bytes to the transport, similar to `write` |
8 | | -- `close(t::RedisTransport)` |
9 | | -- `is_connected(t::RedisTransport)`: whether the transport is connected or not |
10 | | -- `status(t::RedisTransport)`: status of the transport, whether it is connected or not |
11 | | -- `set_props!(t::RedisTransport)`: set any properties required. For example, disable nagle and enable quickack to speed up the usually small exchanges |
12 | | -- `get_sslconfig(t::RedisTransport)`: get the SSL configuration for the transport if applicable |
13 | | -- `io_lock(f, t::RedisTransport)`: lock the transport for IO operations |
| 2 | + Transport module for Redis.jl abstracts the connection to the Redis server. |
| 3 | +
|
| 4 | +Each transport implementation must provide the following methods: |
| 5 | +- `read_line(t::RedisTransport)`: Read one line from the transport, similar to `readline`. Return a `String`. |
| 6 | +- `read_nbytes(t::RedisTransport, m::Int)`: Read `m` bytes from the transport, similar to `read`. Return a `Vector{UInt8}`. |
| 7 | +- `write_bytes(t::RedisTransport, b::Vector{UInt8})`: Write bytes to the transport, similar to `write`. Return the number of bytes written. |
| 8 | +- `close(t::RedisTransport)`: Close the transport. Return `nothing`. |
| 9 | +- `is_connected(t::RedisTransport)`: Whether the transport is connected or not. Return a boolean. |
| 10 | +- `set_props!(t::RedisTransport)`: Set any properties required. For example, disable nagle and enable quickack to speed up the usually small exchanges. Return `nothing`. |
| 11 | +- `get_sslconfig(t::RedisTransport)`: Get the SSL configuration for the transport if applicable. Return a `MbedTLS.SSLConfig` or `nothing`. |
| 12 | +- `io_lock(f, t::RedisTransport)`: Lock the transport for IO operations and execute `f`. Return the result of `f`. |
14 | 13 |
|
15 | 14 | """ |
16 | 15 | module Transport |
|
0 commit comments