You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While load testing my HTTP web server written with SwiftServiceLauncher, I noticed
30
+
While load testing my HTTP web server written with SwiftServiceBootstrap, I noticed
31
31
that one file descriptor is leaked per request.
32
32
33
33
Steps to reproduce:
@@ -50,7 +50,7 @@ My system has IPv6 disabled.
50
50
51
51
## Writing a Patch
52
52
53
-
A good SwiftServiceLauncher patch is:
53
+
A good SwiftServiceBootstrap patch is:
54
54
55
55
1. Concise, and contains as few changes as needed to achieve the end result.
56
56
2. Tested, ensuring that any tests provided failed before the patch and pass after it.
@@ -65,7 +65,7 @@ We require that your commit messages match our template. The easiest way to do t
65
65
66
66
### Make sure Tests work on Linux
67
67
68
-
SwiftServiceLauncher uses XCTest to run tests on both macOS and Linux. While the macOS version of XCTest is able to use the Objective-C runtime to discover tests at execution time, the Linux version is not.
68
+
SwiftServiceBootstrap uses XCTest to run tests on both macOS and Linux. While the macOS version of XCTest is able to use the Objective-C runtime to discover tests at execution time, the Linux version is not.
69
69
For this reason, whenever you add new tests **you have to run a script** that generates the hooks needed to run those tests on Linux, or our CI will complain that the tests are not all present on Linux. To do this, merely execute `ruby ./scripts/generate_linux_tests.rb` at the root of the package and check the changes it made.
Copy file name to clipboardExpand all lines: README.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,16 @@
1
-
# SwiftServiceLauncher
1
+
# SwiftServiceBootstrap
2
2
3
-
SwiftServiceLauncher provides a basic mechanism to cleanly start up and shut down the application, freeing resources in order before exiting.
3
+
SwiftServiceBootstrap 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
-
SwiftServiceLauncher 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
+
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.
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 SwiftServiceLauncher provides today is covered in the [API docs](https://swift-server.github.io/swift-service-launcher/), 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 SwiftServiceBootstrap provides today is covered in the [API docs](https://swift-server.github.io/swift-service-launcher/), 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, SwiftServiceLauncher 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, SwiftServiceBootstrap 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
@@ -20,10 +20,10 @@ To add a dependency on the package, declare it in your `Package.swift`:
@@ -195,7 +195,7 @@ In more complex cases, when signal trapping based shutdown is not appropriate, y
195
195
196
196
[SwiftNIO](https://github.com/apple/swift-nio) is a popular networking library that among other things provides Future abstraction named `EventLoopFuture`.
197
197
198
-
SwiftServiceLauncher comes with a compatibility module designed to make managing SwiftNIO based resources easy.
198
+
SwiftServiceBootstrap comes with a compatibility module designed to make managing SwiftNIO based resources easy.
199
199
200
200
Once you import `ServiceLauncherNIOCompat` module, `Lifecycle.Handler` gains a static helpers named `eventLoopFuture` designed to help simplify the registration call to:
0 commit comments