mirror of
https://github.com/linka-cloud/grpc.git
synced 2025-07-01 13:42:28 +00:00
add metrics, tracing, validation interceptors, add options: WithInterceptors, With{Client,Server}Interceptors
This commit is contained in:
@ -5,6 +5,7 @@ package helloworld;
|
||||
option go_package = "go.linka.cloud/grpc/example;main";
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
import "validate/validate.proto";
|
||||
|
||||
service Greeter {
|
||||
rpc SayHello (HelloRequest) returns (HelloReply) {
|
||||
@ -17,7 +18,7 @@ service Greeter {
|
||||
}
|
||||
|
||||
message HelloRequest {
|
||||
string name = 1;
|
||||
string name = 1 [(validate.rules).string = {min_len: 2, max_len: 40}];
|
||||
}
|
||||
|
||||
message HelloReply {
|
||||
@ -25,6 +26,6 @@ message HelloReply {
|
||||
}
|
||||
|
||||
message HelloStreamRequest {
|
||||
string name = 1;
|
||||
string name = 1 [(validate.rules).string = {min_len: 2, max_len: 40}];
|
||||
int64 count = 2;
|
||||
}
|
||||
|
Reference in New Issue
Block a user