version 1.0.0
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import Foundation
|
||||
import VelodyDomain
|
||||
|
||||
public struct HealthStatusSummary: Hashable, Sendable {
|
||||
public var databaseStatus: String
|
||||
public var storageStatus: String
|
||||
|
||||
public init(
|
||||
databaseStatus: String,
|
||||
storageStatus: String
|
||||
) {
|
||||
self.databaseStatus = databaseStatus
|
||||
self.storageStatus = storageStatus
|
||||
}
|
||||
}
|
||||
|
||||
public protocol VelodyAPIClient: Sendable {
|
||||
func fetchHealthStatus() async throws -> HealthStatusSummary
|
||||
}
|
||||
|
||||
public struct StubVelodyAPIClient: VelodyAPIClient {
|
||||
public let environment: ServerEnvironment
|
||||
|
||||
public init(environment: ServerEnvironment) {
|
||||
self.environment = environment
|
||||
}
|
||||
|
||||
public func fetchHealthStatus() async throws -> HealthStatusSummary {
|
||||
_ = environment
|
||||
return HealthStatusSummary(
|
||||
databaseStatus: "placeholder",
|
||||
storageStatus: "placeholder"
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user