#pragma once
#include <string_view>
#include <samples/greeter_service.usrv.pb.hpp>
namespace samples {
class GreeterService final : public api::GreeterServiceBase {
public:
explicit GreeterService(std::string prefix);
void SayHello(SayHelloCall& call, api::GreetingRequest&& request) override;
void SayHelloResponseStream(SayHelloResponseStreamCall& call,
api::GreetingRequest&& request) override;
void SayHelloRequestStream(SayHelloRequestStreamCall& call) override;
void SayHelloStreams(SayHelloStreamsCall& call) override;
private:
const std::string prefix_;
};
class GreeterServiceComponent final
public:
static constexpr std::string_view kName = "greeter-service";
private:
GreeterService service_;
};
}