49
info *grpc.UnaryServerInfo,
50
handler grpc.UnaryHandler,
52
>
methodName := info.FullMethod
53
>
54
>
// for DescribeTaskQueueRequest, we want to use visibility rate limit only if reachability is queried
55
>
describeTQReq, ok := req.(*workflowservice.DescribeTaskQueueRequest)
56
>
if ok && describeTQReq.GetReportTaskReachability() {
57
methodName += "WithReachability"
58
}
59
60
>
if err := i.Allow(methodName, headers.NewGRPCHeaderGetter(ctx)); err != nil {
rate_limit.go
61
return nil, err
62
}