Swiftpack.co - hummingbird-project/hummingbird-redis as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by hummingbird-project.
hummingbird-project/hummingbird-redis 2.0.0-beta.1
Hummingbird integration with Redis driver RediStack
⭐️ 3
🕓 4 weeks ago
iOS macOS tvOS linux macOS iOS
.package(url: "https://github.com/hummingbird-project/hummingbird-redis.git", from: "2.0.0-beta.1")

Hummingbird Redis Interface

Redis is an open source, in-memory data structure store, used as a database, cache, and message broker.

This is the Hummingbird interface to RediStack library a Swift driver for Redis.

Usage

import Hummingbird
import HummingbirdRedis

let redis = try RedisConnectionPoolService(
    .init(hostname: redisHostname, port: 6379),
    logger: Logger(label: "Redis")
)

// create router and add a single GET /redis route
let router = Router()
router.get("redis") { request, _ -> String in
    let info = try await redis.send(command: "INFO").get()
    return String(describing: info)
}
// create application using router
var app = Application(
    router: router,
    configuration: .init(address: .hostname("127.0.0.1", port: 8080))
)
app.addServices(redis)
// run hummingbird application
try await app.runService()

Documentation

Reference documentation for HummingbirdRedis can be found here

GitHub

link
Stars: 3
Last commit: 3 weeks ago
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Release Notes

v2.0.0 Beta 1
4 weeks ago

This is the first beta release of HummingbirdRedis v2. Below is a list of the changes since the last alpha

Major release changes

  • The "HB" prefix on symbols has been removed. To help transition from previous symbols with the "HB" prefix we have added deprecated typealiases for the old symbols. eg typealias HBRequest = Request.
  • Refactor RedisQueue driver for changes in HummingbirdJobs module.

Other changes

  • 2.0 code has now been merged into main branch.

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics