Function - create_grpc_server#
- openfl.transport.grpc.common.create_grpc_server(uri, use_tls, private_key, certificate, root_certificate, require_client_auth, root_certificate_refresher_cb=None)[source]#
Creates a gRPC server.
- Parameters:
uri (str) – Address for the server (including port number).
use_tls (bool) – If set, the server will use TLS.
private_key (str) – Path to the private key file, required when TLS is enabled.
certificate (str) – Path to the certificate file, required when TLS is enabled.
root_certificate (str) – Path to the root certificate file, required when TLS is enabled.
require_client_auth (bool) – If set, client-side authentication is mandated. Only valid when TLS is enabled.
root_certificate_refresher_cb (function) – Callback function to refresh the root certificate.
- Returns:
grpc.server instance.
- Return type:
server