Skip to content
⚡️ Non-blocking, event-driven Swift client for Redis.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
Sources Make `RedisConnection.sendCommandsImmediately` public Jul 13, 2019
Tests Use `swift test --generate-linuxmain` to handle index of unit tests Jul 13, 2019
docs/theme Update Jazzy Doc Generation Script Jul 9, 2019
scripts 61 -- Rebrand from `RedisNIO` to `RediStack` Jul 9, 2019
.gitignore Add Xcode 11 `.swiftpm` to `.gitignore` Jun 5, 2019
.gitlab-ci.yml Update Jazzy Doc Generation Script Jul 9, 2019
.mailmap
CHANGELOG.md Polish project documents Jul 9, 2019
CODE_OF_CONDUCT.md Add links to new support email. Jul 9, 2019
CONTRIBUTING.md Polish project documents Jul 9, 2019
CONTRIBUTORS.txt Polish project documents Jul 9, 2019
LICENSE.txt Add Copyright Notices, Acknowledgements, and Contributors List May 1, 2019
NOTICE.txt 61 -- Rebrand from `RedisNIO` to `RediStack` Jul 9, 2019
Package.swift Properly export module Jul 11, 2019
README.md Fix relative links in README to legal docs Jul 13, 2019

README.md

RediStack logo

Build Status SSWG Maturity Apache 2 License Swift 5.0+ Redis 5.0+

The GitHub repository is a read-only mirror of the GitLab repository. For issues and merge requests, please visit GitLab.

Introduction

RediStack (pronounced like "ready stack") is a non-blocking Swift client for Redis built on top of SwiftNIO.

It communicates over the network using Redis' Redis Seralization Protocol (RESP2).

The table below lists the major releases alongside their compatible language, dependency, and Redis versions.

SPM Version Swift Redis SwiftNIO SwiftLog SwiftMetrics
from: "1.0.0-alpha.5" 5.0+ 5.0+ 2.x 1.x 1.x

Supported Operating Systems

RediStack runs anywhere that is officially supported by the Swift project.

See the test matrix below for more details.

Installing

To install RediStack, just add the package as a dependency in your Package.swift.

dependencies: [
    .package(url: "https://gitlab.com/mordil/swift-redi-stack.git", from: "1.0.0-alpha.5")
]

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")

Note: Use of wait() was used here for simplicity. Never call this method on an eventLoop!

Documentation

The docs for the latest tagged release are always available at docs.redistack.info.

Questions

For bugs or feature requests, file a new issue.

For all other support requests, please email support@redistack.info.

Changelog

SemVer changes are documented for each release on the releases page.

Contributing

Check out CONTRIBUTING.md for more information on how to help with RediStack.

Contributors

Check out CONTRIBUTORS.txt to see the full list. This list is updated for each release.

Swift on Server Ecosystem

RediStack is part of the Swift on Server Working Group ecosystem - currently recommended as Sandbox Maturity.

Proposal Pitch Discussion Review Vote
SSWG-0004 2019-01-07 2019-04-01 2019-06-09 2019-06-27

Language and Platform Test Matrix

The following table shows the combination of Swift language versions and operating systems that receive regular unit testing (either in development, or with CI).

Swift Version macOS Mojave Ubuntu 16.04 (Xenial) Ubuntu 18.04 (Bionic)
5.0 X X X
5.1 X X
Trunk X X

License

Apache 2.0

Copyright (c) 2019-present, Nathan Harris (@mordil)

This project contains code written by others not affliated with this project. All copyright claims are reserved by them. For a full list, with their claimed rights, see NOTICE.txt

Redis is a registered trademark of Redis Labs. Any use of their trademark is under the established trademark guidelines and does not imply any affiliation with or endorsement by them, and all rights are reserved by them.

Swift is a registered trademark of Apple, Inc. Any use of their trademark does not imply any affiliation with or endorsement by them, and all rights are reserved by them.

You can’t perform that action at this time.