Skip to content

Commit

Permalink
Fix tikv#4373 : change HTTP service source
Browse files Browse the repository at this point in the history
Signed-off-by: Cabinfever_B <cabinfeveroier@gmail.com>
  • Loading branch information
CabinfeverB committed Dec 15, 2021
1 parent 16bbac9 commit fdcee1e
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions server/middleware/self_protection.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ var (
// SelfProtectionHandler a
type SelfProtectionHandler struct {
s *PDServer.Server
// httpApiServiceNames is used to find the service name of api
httpAPIServiceNames map[string]string
// grpcServiceNames is used to find the service name of grpc method
grpcServiceNames map[string]string
// ServiceHandlers a
Expand All @@ -59,9 +57,8 @@ type SelfProtectionHandler struct {

func NewSelfProtectionHandler(server *PDServer.Server) *SelfProtectionHandler {
handler := &SelfProtectionHandler{s: server,
httpAPIServiceNames: config.HTTPAPIServiceNames,
grpcServiceNames: config.GRPCMethodServiceNames,
ServiceHandlers: make(map[string]*ServiceSelfProtectionHandler),
grpcServiceNames: config.GRPCMethodServiceNames,
ServiceHandlers: make(map[string]*ServiceSelfProtectionHandler),
}
handler.UpdateServiceHandlers()
return handler
Expand Down

0 comments on commit fdcee1e

Please sign in to comment.