Swiftpack.co - fourplusone/swift-grpc-health-provider as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
Swift Implementation of grpc_health.v1.health
.package(url: "https://github.com/fourplusone/swift-grpc-health-provider.git", from: "0.1.0")

GRPC HealthProvider

Linux macOS

A convenient provider for grpc_health.v1.health implemented in Swift.

Getting started

Add swift-grpc-health-provider as a dependency in your Package.swift file

    dependencies: [
        // ...
        .package(url:"https://github.com/fourplusone/swift-grpc-health-provider", .branch("master")),
    targets: [
            // ...
            dependencies: [.product(name: "HealthProvider",package:"swift-grpc-health-provider")]),    


Add HealthProvider to your GRPC Server

import GRPC
import NIO
import HealthProvider

let healthProvider = HealthProvider()

let group = MultiThreadedEventLoopGroup(numberOfThreads: 1)
let server = try Server.insecure(group: group)
    .withServiceProviders([healthProvider, /* other providers */])
    .bind(host: "localhost", port: 0)

Set the health of your services

healthProvider.setHealth(status:.serving, serivce:"myService")


This project is licensed under the MIT License. The health.proto file is license under Apache 2.0.


Stars: 2
Last commit: 1 year ago

Ad: Job Offers

iOS Software Engineer @ Perry Street Software
Perry Street Software is Jack’d and SCRUFF. We are two of the world’s largest gay, bi, trans and queer social dating apps on iOS and Android. Our brands reach more than 20 million members worldwide so members can connect, meet and express themselves on a platform that prioritizes privacy and security. We invest heavily into SwiftUI and using Swift Packages to modularize the codebase.

Submit a free job ad (while I'm testing this). The analytics numbers for this website are here.


Release Notes

1 year ago

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics