Creates and configures a gRPC server instance.
This function initializes a gRPC server with the provided port and a configuration block (GrpcServerConfiguration).
To start the server, call the GrpcServer.start method. To clean up resources, call the GrpcServer.shutdown or GrpcServer.shutdownNow methods.
GrpcServer(port) {
credentials = tls(myCertChain, myPrivateKey)
services {
registerService<MyService> { MyServiceImpl() }
registerService<MyOtherService> { MyOtherServiceImpl() }
}
}Return
A fully configured GrpcServer instance, which must be started explicitly to handle requests.
Parameters
The port number where the gRPC server will listen for incoming connections. This must be a valid and available port on the host system.
The parent coroutine context used for managing server-related operations. Defaults to an empty coroutine context if not specified.
A configuration lambda receiver, allowing customization of server behavior such as credentials, interceptors, marshallers, and service registration logic.