mirror of
https://github.com/apple/swift-nio-extras
synced 2026-11-24 04:37:58 +00:00
This PR adds a `CertificateReloader` protocol and a `TimedCertificateReloader` implementation. A `CertificateReloader` allows for certificate-key pairs to be observed and updated. A `TimedCertificateReloader` does this every set interval of time. This PR also provides an extension on `TLSConfiguration` to enable this reloading ability in NIO applications, so that updated certificates and keys can be used during SSL handshakes; as well as conformance of the `TimedCertificateReloader` to `swift-service-lifecycle`'s `Service` protocol, for easy composition.