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 type ParseError.

    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 - Combine

  • Calls the health check function asynchronously. Publishes when complete.

    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.