The core library that powers CanaryDesktop, CanaryDesktopLegacy, and CanaryLinux.
Canary is a tool for testing transport connections and gathering the packets for analysis.
Canary will run a series of transport tests based on the configs that you provide. It is possible to test each transport on a different transport server based on what host information is provided in the transport config files.
Currently only Shadow tests are supported. Replicant support is underway, and will be capable of mimicking other transports when it is complete.
let package = Package(
name: "MyApp",
platforms: [.macOS(.v11)],
products: [
.executable(
name: "MyApp",
targets: ["MyApp"])],
dependencies: [
.package(url: "https://github.com/OperatorFoundation/Canary.git", branch: "main"),
.package(url: "https://github.com/apple/swift-log.git", from: "1.4.2")],
targets: [
.executableTarget(
name: "MyApp",
dependencies: [
"Canary",
.product(name: "Logging", package: "swift-log")]),
.testTarget(
name: "MyAppTests",
dependencies: ["MyApp"])],
swiftLanguageVersions: [.v5])
The Canary library provides a very simple API:
The Canary initializer takes the following Arguments:
Only two of teh parameters are required and do not offer a default value. Quick setup:
let canary = Canary(configPath: configDirectoryPath, logger: logger)
Once you have a Canary instance you simply have to call runTest():
canary.runTest()
link |
Stars: 0 |
Last commit: 2 weeks ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics