@@ -76,6 +76,8 @@ on [SwiftNIO](https://github.com/apple/swift-nio) and the [AysncHTTPClient](http
76
76
| ` 0.17.x ` | - | - | - | ✓ | - | - |
77
77
| ` 0.18.x ` | - | - | - | - | ✓ | - |
78
78
| ` 0.19.x ` | - | - | - | - | - | ✓ |
79
+ | ` 0.20.x ` | - | - | - | - | - | ✓ |
80
+ | ` 0.21.x ` | - | - | - | - | - | ✓ |
79
81
80
82
- ` ✓ ` Exact match of API objects in both client and the Kubernetes version.
81
83
- ` - ` API objects mismatches either due to the removal of old API or the addition of new API. However, everything the
@@ -259,7 +261,7 @@ The task instance must be started explicitly via ``SwiftkubeClientTask/start()``
259
261
buffering policy is used, which should be taken into consideration.
260
262
261
263
``` swift
262
- let task: SwiftkubeClientTask = client.pods .watch (in : .allNamespaces )
264
+ let task: SwiftkubeClientTask = try await client.pods .watch (in : .allNamespaces )
263
265
let stream = await task.start ()
264
266
265
267
for try await event in stream {
@@ -275,7 +277,7 @@ let options = [
275
277
.labelSelector (.exists ([" env" ]))
276
278
]
277
279
278
- let task = client.pods .watch (in : .default , options : options)
280
+ let task = try await client.pods .watch (in : .default , options : options)
279
281
```
280
282
281
283
The client reconnects automatically and restarts the watch upon encountering non-recoverable errors. The
@@ -293,7 +295,7 @@ let strategy = RetryStrategy(
293
295
initialDelay = 5.0 ,
294
296
jitter = 0.2
295
297
)
296
- let task = client.pods .watch (in : .default , retryStrategy : strategy)
298
+ let task = try await client.pods .watch (in : .default , retryStrategy : strategy)
297
299
298
300
for try await event in await task.stream () {
299
301
print (event)
@@ -313,9 +315,9 @@ The `follow` API resembles the `watch`, but instead of events, it emits the log
313
315
:warning : The client does not reconnect on errors in ` follow ` mode.
314
316
315
317
``` swift
316
- let task = client.pods .follow (in : .default , name : " nginx" , container : " app" )
318
+ let task = try await client.pods .follow (in : .default , name : " nginx" , container : " app" )
317
319
318
- for try await line in task.start () {
320
+ for try await line in await task.start () {
319
321
print (line)
320
322
}
321
323
@@ -544,7 +546,7 @@ app.get("metrics") { request -> EventLoopFuture<String> in
544
546
To use the `SwiftkubeClient` in a SwiftPM project, add the following line to the dependencies in your `Package.swift` file :
545
547
546
548
` ` ` swift
547
- .package(name: "SwiftkubeClient", url: "https://github.com/swiftkube/client.git", from: "0.19 .0")
549
+ .package(name: "SwiftkubeClient", url: "https://github.com/swiftkube/client.git", from: "0.21 .0")
548
550
` ` `
549
551
550
552
then include it as a dependency in your target :
@@ -555,7 +557,7 @@ import PackageDescription
555
557
let package = Package(
556
558
// ...
557
559
dependencies: [
558
- .package(name: "SwiftkubeClient", url: "https://github.com/swiftkube/client.git", from: "0.19 .0")
560
+ .package(name: "SwiftkubeClient", url: "https://github.com/swiftkube/client.git", from: "0.21 .0")
559
561
],
560
562
targets: [
561
563
.target(name: "<your-target>", dependencies: [
0 commit comments