From 67ffae03c41bf395f7158cc3907f11fea4cc30c9 Mon Sep 17 00:00:00 2001 From: Dariusz Rybicki <dariusz@elixxir.io> Date: Thu, 27 Oct 2022 15:24:45 +0200 Subject: [PATCH] Add CMixIncreaseParallelNodeRegistration wrapper --- Sources/XXClient/CMix/CMix.swift | 3 +++ ...CMixIncreaseParallelNodeRegistration.swift | 24 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 Sources/XXClient/CMix/Functions/CMixIncreaseParallelNodeRegistration.swift diff --git a/Sources/XXClient/CMix/CMix.swift b/Sources/XXClient/CMix/CMix.swift index d02f0a78..b630dc44 100644 --- a/Sources/XXClient/CMix/CMix.swift +++ b/Sources/XXClient/CMix/CMix.swift @@ -8,6 +8,7 @@ public struct CMix { public var getNodeRegistrationStatus: CMixGetNodeRegistrationStatus public var hasRunningProcesses: CMixHasRunningProcesses public var getRunningProcesses: CMixGetRunningProcesses + public var increaseParallelNodeRegistration: CMixIncreaseParallelNodeRegistration public var networkFollowerStatus: CMixNetworkFollowerStatus public var startNetworkFollower: CMixStartNetworkFollower public var stopNetworkFollower: CMixStopNetworkFollower @@ -28,6 +29,7 @@ extension CMix { getNodeRegistrationStatus: .live(bindingsCMix), hasRunningProcesses: .live(bindingsCMix), getRunningProcesses: .live(bindingsCMix), + increaseParallelNodeRegistration: .live(bindingsCMix), networkFollowerStatus: .live(bindingsCMix), startNetworkFollower: .live(bindingsCMix), stopNetworkFollower: .live(bindingsCMix), @@ -49,6 +51,7 @@ extension CMix { getNodeRegistrationStatus: .unimplemented, hasRunningProcesses: .unimplemented, getRunningProcesses: .unimplemented, + increaseParallelNodeRegistration: .unimplemented, networkFollowerStatus: .unimplemented, startNetworkFollower: .unimplemented, stopNetworkFollower: .unimplemented, diff --git a/Sources/XXClient/CMix/Functions/CMixIncreaseParallelNodeRegistration.swift b/Sources/XXClient/CMix/Functions/CMixIncreaseParallelNodeRegistration.swift new file mode 100644 index 00000000..0a438c70 --- /dev/null +++ b/Sources/XXClient/CMix/Functions/CMixIncreaseParallelNodeRegistration.swift @@ -0,0 +1,24 @@ +import Bindings +import XCTestDynamicOverlay + +public struct CMixIncreaseParallelNodeRegistration { + public var run: (Int) throws -> Void + + public func callAsFunction(num: Int) throws { + try run(num) + } +} + +extension CMixIncreaseParallelNodeRegistration { + public static func live(_ bindingsCMix: BindingsCmix) -> CMixIncreaseParallelNodeRegistration { + CMixIncreaseParallelNodeRegistration( + run: bindingsCMix.increaseParallelNodeRegistration + ) + } +} + +extension CMixIncreaseParallelNodeRegistration { + public static let unimplemented = CMixIncreaseParallelNodeRegistration( + run: XCTestDynamicOverlay.unimplemented("\(Self.self)") + ) +} -- GitLab