61 -- Rebrand from `RedisNIO` to `RediStack` Closes #61 See merge request Mordil/swift-redis-nio-client!73
| The GitHub repository is a read-only mirror of the GitLab repository. For issues and merge requests, please visit GitLab. |
|---|
Swift RediStack
A non-blocking Swift client for Redis built on top of SwiftNIO.
This package defines everything you need to work with Redis through the Redis Seralization Protocol (RESP).
RediStack is part of the Swift on Server Working Group ecosystem.
| Proposal | Pitch | Discussion | Review | Vote |
|---|---|---|---|---|
| SSWG-0004 | 2019-01-07 | 2019-04-01 | 2019-06-09 | 2019-06-27 |
📦 Installation
To install RediStack, just add the package as a dependency in your Package.swift
dependencies: [
.package(url: "https://github.com/Mordil/swift-redis-nio-client.git", from: "1.0.0-alpha.4")
]
and run the following command: swift package resolve
⚡ Getting Started
RediStack is quick to use - all you need is an EventLoop from SwiftNIO.
import NIO
import RediStack
let eventLoop: EventLoop = ...
let connection = RedisConnection.connect(
to: try .init(ipAddress: "127.0.0.1", port: RedisConnection.defaultPort),
on: eventLoop
).wait()
let result = try connection.set("my_key", to: "some value")
.flatMap { return connection.get("my_key") }
.wait()
print(result) // Optional("some value")
📕 Documentation
API Documentation is generated every time a new release is published.
The latest version's docs are always available at https://mordil.gitlab.io/swift-redis-nio-client
🚧 Contributing
Check out CONTRIBUTING.md for more information on how to help with RediStack.
It is highly recommended to use Docker to install Redis locally.
docker run -d -p 6379:6379 --name redis redis:5
Otherwise, install Redis directly on your machine from Redis.io.