Hello, Im pretty new to gRPC but I was wondering if the following is possible
I have a proto file which contains a single service with two RPCs which looks as follows:
service MyService {
// This function requires credentials
rpc YouNeedCreds(Empty) returns (Empty) {}
// This function should be callable by anyone without credentials
rpc NoCredentialsNeeded(Empty) returns (Empty) {}
}
My question is, is it possible, using C++ to have a single service where different PRCs have varying authentication requirements, without having to deploy to something like google cloud (I just want to run it between 2 computers on the same network)?
I have seen references to using .yaml files to configure services (
like this one), but I have not found any examples on how this works in C++ (how do you actually read this file so that the gRPC service applies the configurations), and I don't intend on deploying this on google cloud. I just want to run this on my local network and use the device IP to connect to the service.
At the moment I create the server by creating using grpc::SslSecureCredentials and passing them to the .AddListeningPort method provided by the grpc::ServerBuilder.
Hopefully this is somewhat helpful, thanks in advanced for.