Releases: swift-server/RediStack
RediStack 1.0.0 Alpha 9
API Docs are always available at docs.redistack.info
Major
- The
isConnected
property is no longer a requirement for theRedisClient
protocol #73 - Dozens of the convenience command methods that return
RESPValue
types now have an overload for mapping to a desired end type !106 - The
RESPValue.init(bulk:)
initializer has been replaced by a single genericinit(from:)
form !108
RediStack 1.0.0 Alpha 8
API Docs are always available at docs.redistack.info
Major
- All commands that require a
String
key is now a type-safe representation calledRedisKey
!93- It conforms to:
Hashable
,RESPValueConvertible
,Codable
,Comparable
,Equatable
,ExpressibleByStringLiteral
andRawRepresentable
RESPValue
now has an init overload forRedisKey
- It conforms to:
- The
RedisClient
protocol now has anisConnected: Bool
readonly property requirement !95 - All timeout related command parameters now use the
NIO.TimeAmount
type, rather thanInt
!96 - The
zadd
command API has been reworked to be more expressive and type-safe !97RedisSortedSetAddOption
is nowRedisZaddInsertBehavior
RedisZaddReturnBehavior
has been added, instead of a Boolean parameterlet client = ... client.zadd( (element, 3), to: "my_sorted_set", inserting: .onlyNewElements, returning: .insertedElementsCount )
- The range command APIs for SortedSet and List types in Redis have been reworked to be more expressive with the Swift range syntax !98
- The range based APIs also have been changed to be type-safe instead of the old String based API with the
RedisZLexBound
andRedisZScoreBound
enumslet client = ... client.lrange(from: "my_list", indices: 3...5)
- The range based APIs also have been changed to be type-safe instead of the old String based API with the
EventLoopFuture.convertFromRESPValue
has been renamed to be an overload ofmap
!104
Minor
- Added the
authorize
command method toRedisClient
!94 Collection
ofRESPValue
now have severalmap
overloads to convert the RESPValue to other types that areRESPValueConvertible
!103
Patch
- Updated SwiftMetrics version to be
1.0.0 ..< 3.0.0
(973a9162)
RediStack 1.0.0 Alpha 7.2
API Docs are always available at docs.redistack.info
Patch
- Updated SwiftMetrics version to be
1.0.0 ..< 3.0.0
(bf9a1cd9)
RediStack 1.0.0 Alpha 7.1
API Docs are always available at docs.redistack.info
Patch
- Fixed deprecation warnings of SwiftNIO's
Atomic
usage (8d85cb2b)
RediStack 1.0.0 Alpha 7
API Docs are always available at docs.redistack.info
All changes made in this tag were from Merge Request !92.
Logging is now more dynamic - as RedisClient
loggers can be changed, rather than being static at initialization.
This is particularly useful for attaching metadata from a logger you already have, so you can correlate the logs generated by RediStack.
For example:
let connection = RedisConnection.connect(...)
let response = connection
.logging(to: myRequestLogger) // this logger has a `requestID` metadata element
.ping() // logs from RedisConnection while fulfilling this command will also include the `requestID` metadata
.wait()
Major
RedisClient
has 2 new requirements:logger: Logging.Logger
readonly propertysetLogging(to: Logging.Logger)
method
RedisCommandHandler
no longer supports logging- The init method has been changed to no longer accept a
Logger
- The init method has been changed to no longer accept a
RedisMessageEncoder
no longer supports logging- The init method has been changed to just an empty init
- The exact timing of when certain logs and metrics has been tweaked slightly in the
RedisConnection.init
method
Minor
RedisClient
has a default extension methodlogging(to:)
that is chainable and callssetLogging(to:)
RedisConnection
now has a publicid: UUID
propertyRedisConnection
has moretrace
logs- Some
RedisConnection
debug
logs re-adjusted totrace
- Some
RedisConnection
logs had their level increased to account for being the sole source of logs now
Patch
- The
RedisConnection
metadata id value is now correctly stable. - Corrected some code documentation, specifically around logging.
RediStack 1.0.0 Alpha 6.1
API Docs are always available at docs.redistack.info
Minor
- Several methods now have variadic overloads !87
get
now has a generic overload for anyRESPValueConvertible
type !86- The
String
specialized implementation is still available
- The
Patch
- Unnecessary assertions in
RedisCommandHandler
have been removed !85
RediStack 1.0.0 Alpha 6
API Docs are always available at docs.redistack.info
Major
RedisIntegrationTestCase
now has properties that can be overridden in subclasses for specializing how to connect to Redis !74RESPTranslator.ParsingError
has two new cases:invalidBulkStringSize
andbulkStringSizeMismatch
!82RedisMetrics.activeConnectionCount
is no longer anInt
and instead is a new specialized wrapper class calledActiveConnectionGauge
!84- This is to address the data race found by the thread sanitizer that now runs on test passes
- It maintains an internal
Atomic<Int>
count that can be modified with the publicincrement(by:)
/decrement(by:)
methods
Minor
RESPValue
now conforms toEquatable
!76RedisError
now conforms toEquatable
!77RESPValue.init(bulk:)
now accepts a wider range of values !81- The
String
overload is nowString?
- The
Int
overload is now generic with a constraint ofFixedWidthInteger
- The
Patch
- Fixed a data race with
RedisMetrics.activeConnectionCount
that was caught with the new thread sanitizer test passes !84- The job that caught the error: https://gitlab.com/Mordil/swift-redi-stack/-/jobs/302079265
RediStack 1.0.0 Alpha 5.0.2
API Docs are always available at docs.redistack.info
Patch
RedisConnection.sendCommandsImmediately
is now correctlypublic
(fae8eada)
RediStack 1.0.0 Alpha 5.0.1
API Docs are always available at docs.redistack.info
Patch
RediStackTestUtils
is now correctly an importable module (aeae1f6c)
RediStack 1.0.0 Alpha 5
API Docs are always available at docs.redistack.info
Major
- The library module was renamed from
RedisNIO
toRediStack
!73 RedisNIOError
was renamed toRedisClientError
!72.responseConversion(to:)
was renamed to.failedRESPConversion(to:)
.unsupportedOperation(method:message:)
was removed
RedisCommandHandler
is no longeropen
(nowpublic final
) !55RedisCommandContext
was renamed toRedisCommand
!66RedisCommand.command
was renamed tomessage
and the initializer signature updated to match its properties (2605763)RedisCommandHandler.init(logger:)
is now.init(initialQueueCapacity:logger:)
!66- The names for the
ChannelPipeline
handlers are now explicitly named !66RediStack.OutgoingHandler
RediStack.IncomingHandler
RediStack.CommandHandler
- The
Redis
namespace enum was removed !71- The
makeConnection
factory method was moved toRedisConnection.connect
- This method now requires a
NIO.EventLoop
instance, no longer creating aMultiThreadedEventLoopGroup
for you - This method also now supports overriding the default
NIO.ClientBootstrap
and is the preferred way of building your own pipelines
- This method now requires a
- The
RedisConnection.init
is now internal, all connections are made withRedisConnection.connect
!71- A few different logs have had their severity adjusted
- Sending a command while the connection is closed is now a
warning
!71
- Sending a command while the connection is closed is now a
- Sorted Set methods
zadd
,zunionstore
, andzinterstore
, have stronger type safety with options defined as enums !70 and (0ecb3c1) RESPValueConvertible
is no longer used as an existential !69- This also changes
RedisConnection.send(command:with:)
to require theRESPValue
arguments up front, rather than doing the conversion for you
- This also changes
RESPValue
andRESPValueConvertible
had many internal implementations changed !67RESPValue.array
no longer usesContiguousArray
ContiguousArray
is no longerRESPValueConvertible
- several of the computed properties on
RESPValue
will no longer behave exactly the same, or have moved to the newRediStackTestUtils
module
Redis.makeDefaultClientBootstrap(using:)
was renamed and moved toClientBootstrap.makeRedisTCPClient(group:)
!64- The implementation for adding the "default" RESP handlers is now publicly available with
Channel.addBaseRedisHandlers()
- The implementation for adding the "default" RESP handlers is now publicly available with
RESPTranslator
saw a major refactor !63- It is now a struct instead of an enum
ByteBuffer.writeRESPValue(_:)
is a new method carrying most of the implementation for writing outRESPValue
RESPTranslator.ParsingResult
was removedRESPTranslator
now updates the passed inByteBuffer.readerIndex
on successful parsesRESPTranslator.parseBytes(from:)
uses the passed inByteBuffer
entirely for position and recursion
RESPValueConvertible.init(_:)
was renamed to.init(fromRESP:)
!56
Minor
- A new module
RediStackTestUtils
is available for some helpers with writing tests for RediStack !67
Patch
- The observable behavior of closing a channel should be more straight forward and dependable !71