Expand description
Redis storage and message publishing.
To receive Redis messages, use the Redis trigger.
§Examples
Get a value from the Redis database.
use spin_sdk::redis::Connection;
let conn = Connection::open("redis://127.0.0.1:6379")?;
let payload = conn.get("archimedes-data")?;
if let Some(data) = payload {
println!("{}", String::from_utf8_lossy(&data));
}
See the Connection
type for further examples.
Structs§
- Connection
- An open connection to a Redis server.
Enums§
- Error
- Errors related to interacting with Redis
- Redis
Parameter - A parameter type for the general-purpose
execute
function. - Redis
Result - A return type for the general-purpose
execute
function.
Type Aliases§
- Payload
- The message payload.