|
1 |
| -# SwiftServiceBootstrap |
| 1 | +# SwiftServiceLifecycle |
2 | 2 |
|
3 |
| -SwiftServiceBootstrap provides a basic mechanism to cleanly start up and shut down the application, freeing resources in order before exiting. |
| 3 | +SwiftServiceLifecycle provides a basic mechanism to cleanly start up and shut down the application, freeing resources in order before exiting. |
4 | 4 | It also provides a `Signal`-based shutdown hook, to shutdown on signals like `TERM` or `INT`.
|
5 | 5 |
|
6 |
| -SwiftServiceBootstrap was designed with the idea that every application has some startup and shutdown workflow-like-logic which is often sensitive to failure and hard to get right. |
| 6 | +SwiftServiceLifecycle was designed with the idea that every application has some startup and shutdown workflow-like-logic which is often sensitive to failure and hard to get right. |
7 | 7 | The library codes this common need in a safe and reusable way that is non-framework specific, and designed to be integrated with any server framework or directly in an application.
|
8 | 8 |
|
9 |
| -This is the beginning of a community-driven open-source project actively seeking contributions, be it code, documentation, or ideas. What SwiftServiceBootstrap provides today is covered in the [API docs](https://swift-server.github.io/swift-service-bootstrap/), but it will continue to evolve with community input. |
| 9 | +This is the beginning of a community-driven open-source project actively seeking contributions, be it code, documentation, or ideas. What SwiftServiceLifecycle provides today is covered in the [API docs](https://swift-server.github.io/swift-service-lifecycle/), but it will continue to evolve with community input. |
10 | 10 |
|
11 | 11 | ## Getting started
|
12 | 12 |
|
13 |
| -If you have a server-side Swift application or a cross-platform (e.g. Linux, macOS) application, and you would like to manage its startup and shutdown lifecycle, SwiftServiceBootstrap is a great idea. Below you will find all you need to know to get started. |
| 13 | +If you have a server-side Swift application or a cross-platform (e.g. Linux, macOS) application, and you would like to manage its startup and shutdown lifecycle, SwiftServiceLifecycle is a great idea. Below you will find all you need to know to get started. |
14 | 14 |
|
15 | 15 | ### Adding the dependency
|
16 | 16 |
|
17 | 17 | To add a dependency on the package, declare it in your `Package.swift`:
|
18 | 18 |
|
19 | 19 | ```swift
|
20 |
| -.package(url: "https://github.com/swift-server/swift-service-bootstrap.git", from: "1.0.0-alpha.2"), |
| 20 | +.package(url: "https://github.com/swift-server/swift-service-lifecycle.git", from: "1.0.0-alpha.2"), |
21 | 21 | ```
|
22 | 22 |
|
23 |
| -and to your application target, add "SwiftServiceBootstrap" to your dependencies: |
| 23 | +and to your application target, add "SwiftServiceLifecycle" to your dependencies: |
24 | 24 |
|
25 | 25 | ```swift
|
26 | 26 | .target(name: "MyApplication", dependencies: ["Lifecycle"]),
|
@@ -247,7 +247,7 @@ lifecycle.wait()
|
247 | 247 |
|
248 | 248 | [SwiftNIO](https://github.com/apple/swift-nio) is a popular networking library that among other things provides Future abstraction named `EventLoopFuture`.
|
249 | 249 |
|
250 |
| -SwiftServiceBootstrap comes with a compatibility module designed to make managing SwiftNIO based resources easy. |
| 250 | +SwiftServiceLifecycle comes with a compatibility module designed to make managing SwiftNIO based resources easy. |
251 | 251 |
|
252 | 252 | Once you import `LifecycleNIOCompat` module, `Lifecycle.Handler` gains a static helper named `eventLoopFuture` designed to help simplify the registration call to:
|
253 | 253 |
|
|
0 commit comments