gRPC
gRPC is Gortexa’s native protocol. External connections arrive on the same h2c port; the mux dispatches on Content-Type: application/grpc to grpc-go’s ServeHTTP mode.
Service definition and generated code
Section titled “Service definition and generated code”Services are defined in proto. The built-in sample resource:
service ResourceService { rpc CreateResource(CreateResourceRequest) returns (Resource); rpc GetResource(GetResourceRequest) returns (Resource); rpc ListResources(ListResourcesRequest) returns (ListResourcesResponse); rpc UpdateResource(UpdateResourceRequest) returns (Resource); rpc DeleteResource(DeleteResourceRequest) returns (google.protobuf.Empty);}gortexa regen writes stubs to gen/; logic implementations live in internal packages. The two never mix.
Calling the service
Section titled “Calling the service”For local grpcurl testing, enable reflection first (it is off by default):
GORTEXA_SERVER__REFLECTION=true gortexa rungrpcurl -plaintext \ -H 'authorization: Bearer <token>' \ -d '{"id":"x"}' \ localhost:8080 resource.v1.ResourceService/GetResourceWithout a token you get UNAUTHENTICATED: auth treats all three protocols the same way.
Health
Section titled “Health”The three-state health model maps to the standard gRPC Health protocol. Register real dependency checks with app.Health().Register(...) so /readyz and gRPC Health reflect actual DB, cache and MQ reachability. Each check runs under a 5-second timeout, so one slow dependency cannot stall the whole query.
Reflection
Section titled “Reflection”gRPC reflection is off by default. Enable it via config or an environment variable when needed:
GORTEXA_SERVER__REFLECTION=trueKeep it off in production — see Deployment.