Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hummingbird-project/hummingbird-redis
Hummingbird integration with Redis driver RediStack
https://github.com/hummingbird-project/hummingbird-redis
hummingbird redis server swift
Last synced: about 1 month ago
JSON representation
Hummingbird integration with Redis driver RediStack
- Host: GitHub
- URL: https://github.com/hummingbird-project/hummingbird-redis
- Owner: hummingbird-project
- License: apache-2.0
- Created: 2021-01-26T10:38:55.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2024-12-05T20:35:01.000Z (about 1 month ago)
- Last Synced: 2024-12-05T21:28:27.569Z (about 1 month ago)
- Topics: hummingbird, redis, server, swift
- Language: Swift
- Homepage:
- Size: 111 KB
- Stars: 12
- Watchers: 5
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# 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](https://gitlab.com/mordil/RediStack.git) a Swift driver for Redis.
## Usage
```swift
import Hummingbird
import HummingbirdRedislet 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](https://docs.hummingbird.codes/2.0/documentation/hummingbirdredis)