ParseHealth
public struct ParseHealth : ParseType, Decodable
ParseHealth
allows you to check the health of a Parse Server.
-
Calls the health check function synchronously and returns a result of it’s execution.
Throws
An error of typeParseError
.Note
The default cache policy for this method is.reloadIgnoringLocalCacheData
. If a developer desires a different policy, it should be inserted inoptions
.Declaration
Swift
public static func check(options: API.Options = []) throws -> String
Parameters
options
A set of header options sent to the server. Defaults to an empty set.
Return Value
Returns the status of the server.
-
Calls the health check function asynchronously and returns a result of it’s execution.
Declaration
Swift
static public func check(options: API.Options = [], callbackQueue: DispatchQueue = .main, completion: @escaping (Result<String, ParseError>) -> Void)
Parameters
options
A set of header options sent to the server. Defaults to an empty set.
callbackQueue
The queue to return to after completion. Default value of .main.
completion
A block that will be called when the health check completes or fails. It should have the following argument signature:
(Result<String, ParseError>)
.
-
check(options:
Asynchronous) Calls the health check function asynchronously.
Throws
An error of typeParseError
.Declaration
Swift
static func check(options: API.Options = []) async throws -> String
Parameters
options
A set of header options sent to the server. Defaults to an empty set.
Return Value
Status of ParseServer.
-
Calls the health check function asynchronously.
Declaration
Swift
static func checkPublisher(options: API.Options = []) -> Future<String, ParseError>
Parameters
options
A set of header options sent to the server. Defaults to an empty set.
Return Value
A publisher that eventually produces a single value and then finishes or fails.