Skip to content

Commit 26299c0

Browse files
authored
Readme: Clarify how to obtain an EventLoop (#89)
Fixes a dead link to the EventLoop docs, and add a default way to obtain an EventLoop using NIOSingletons.
1 parent 30a43b0 commit 26299c0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,14 @@ dependencies: [
2929

3030
## Getting Started
3131

32-
**RediStack** is quick to use - all you need is an [`EventLoop`](https://apple.github.io/swift-nio/docs/current/NIO/Protocols/EventLoop.html) from **SwiftNIO**.
32+
**RediStack** is quick to use - all you need is an [`EventLoop`](https://swiftpackageindex.com/apple/swift-nio/main/documentation/niocore/eventloop) from **SwiftNIO**.
3333

3434
```swift
3535
import NIOCore
36+
import NIOPosix
3637
import RediStack
3738

38-
let eventLoop: EventLoop = ...
39+
let eventLoop: EventLoop = NIOSingletons.posixEventLoopGroup.any()
3940
let connection = RedisConnection.make(
4041
configuration: try .init(hostname: "127.0.0.1"),
4142
boundEventLoop: eventLoop

0 commit comments

Comments
 (0)