Structures
The following structures are available globally.
-
The
NIO.ChannelOutboundHandler.OutboundIn
type forRedisCommandHandler
.This holds the full command message to be sent to Redis, and an
NIO.EventLoopPromise
to be fulfilled when a response has been received.Important
This struct has reference semantics due to the retention of theNIO.EventLoopPromise
.Declaration
Swift
public struct RedisCommand
-
A condition which must hold true in order for a key to be set.
See https://redis.io/commands/set
See moreDeclaration
Swift
public struct RedisSetCommandCondition : Hashable
-
Declaration
Swift
public struct RedisSetCommandExpiration : Hashable
-
If something goes wrong with any part of the Redis connection pool, errors of this type will be thrown.
See moreDeclaration
Swift
public struct RedisConnectionPoolError : LocalizedError, Equatable
-
A helper object for translating between raw bytes and Swift types according to the Redis Serialization Protocol (RESP).
See https://redis.io/topics/protocol
See moreDeclaration
Swift
public struct RESPTranslator
-
A representation of a Redis Pub/Sub channel.
RedisChannelName
is a thin wrapper aroundString
, to provide stronger type-safety at compile time.It conforms to
ExpressibleByStringLiteral
andExpressibleByStringInterpolation
, so creating an instance is simple:
See morelet channel: RedisChannelName = "channel1" // or "\(channelNameVariable)"
Declaration
Swift
public struct RedisChannelName: RESPValueConvertible, RawRepresentable, ExpressibleByStringLiteral, ExpressibleByStringInterpolation, CustomStringConvertible, CustomDebugStringConvertible, Comparable, Hashable, Codable
-
When working with
See moreRedisClient
, runtime errors can be thrown to indicate problems with connection state, decoding assertions, or otherwise.Declaration
Swift
public struct RedisClientError : LocalizedError, Equatable, Hashable
-
If something goes wrong with a command within Redis, it will respond with an error that is captured and represented by instances of this type.
See moreDeclaration
Swift
public struct RedisError : LocalizedError
extension RedisError: Equatable, Hashable
extension RedisError: RESPValueConvertible
-
A representation of a key in Redis.
RedisKey
is a thin wrapper aroundString
, to provide stronger type-safety at compile-time.It conforms to
ExpressibleByStringLiteral
andExpressibleByStringInterpolation
, so creating a key is simple:
See morelet key: RedisKey = "foo" // or "\(someVar)"
Declaration
Swift
public struct RedisKey: RESPValueConvertible, RawRepresentable, ExpressibleByStringLiteral, ExpressibleByStringInterpolation, CustomStringConvertible, CustomDebugStringConvertible, Comparable, Hashable, Codable
-
The system funnel for all
Metrics
interactions from the Redis library.It is highly recommended to not interact with this directly, and to let the library use it how it sees fit.
There is a nested enum type of
See moreRedisMetrics.Label
that is available to query, match, etc. the labels used for all of theMetrics
types created by the Redis library.Declaration
Swift
public struct RedisMetrics