Merge pull request #10761 from cpuguy83/shim_remove_nethttp

More shim imports cleanup
This commit is contained in:
Phil Estes
2024-10-03 14:56:25 +00:00
committed by GitHub
7 changed files with 163 additions and 55 deletions

View File

@@ -74,7 +74,7 @@ func init() {
}
var (
_ = shim.TTRPCServerOptioner(&taskServiceWithFp{})
_ = shim.TTRPCServerUnaryOptioner(&taskServiceWithFp{})
)
type taskServiceWithFp struct {
@@ -87,7 +87,7 @@ func (s *taskServiceWithFp) RegisterTTRPC(server *ttrpc.Server) error {
return nil
}
func (s *taskServiceWithFp) UnaryInterceptor() ttrpc.UnaryServerInterceptor {
func (s *taskServiceWithFp) UnaryServerInterceptor() ttrpc.UnaryServerInterceptor {
return func(ctx context.Context, unmarshal ttrpc.Unmarshaler, info *ttrpc.UnaryServerInfo, method ttrpc.Method) (interface{}, error) {
methodName := filepath.Base(info.FullMethod)
if fp, ok := s.fps[methodName]; ok {