Skip to content

Commit

Permalink
remove register api
Browse files Browse the repository at this point in the history
Signed-off-by: husharp <[email protected]>
  • Loading branch information
HuSharp committed Aug 30, 2024
1 parent 09e272f commit 0594ffe
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
6 changes: 3 additions & 3 deletions pkg/mcs/metastorage/server/grpc_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ func (s *Service) RegisterGRPCService(g *grpc.Server) {
}

// RegisterRESTHandler registers the service to REST server.
func (s *Service) RegisterRESTHandler(userDefineHandlers map[string]http.Handler) error {
handler, group := SetUpRestHandler(s)
return apiutil.RegisterUserDefinedHandlers(userDefineHandlers, &group, handler)
func (s *Service) RegisterRESTHandler(_ map[string]http.Handler) error {

Check failure on line 74 in pkg/mcs/metastorage/server/grpc_service.go

View workflow job for this annotation

GitHub Actions / statics

unused-receiver: method receiver 's' is not referenced in method's body, consider removing or renaming it as _ (revive)
// restful API is not implemented yet.
return nil
}

func (s *Service) checkServing() error {
Expand Down
4 changes: 2 additions & 2 deletions tools/pd-api-bench/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ The api bench cases we support are as follows:
You can run shell as follows.

```shell
go run main.go -http-cases GetRegionStatus-1+1,GetMinResolvedTS-1+1 -client 1 -debug true
go run main.go --http-cases GetRegionStatus-1+1,GetMinResolvedTS-1+1 --client 1 --debug true
```

### TLS
Expand All @@ -76,7 +76,7 @@ You can use the following command to generate a certificate for testing TLS:
```shell
mkdir cert
./cert_opt.sh generate cert
go run main.go -http-cases GetRegionStatus-1+1,GetMinResolvedTS-1+1 -client 1 -debug true -cacert ./cert/ca.pem -cert ./cert/pd-server.pem -key ./cert/pd-server-key.pem
go run main.go --http-cases GetRegionStatus-1+1,GetMinResolvedTS-1+1 --client 1 --debug true --cacert ./cert/ca.pem --cert ./cert/pd-server.pem --key ./cert/pd-server-key.pem
./cert_opt.sh cleanup cert
rm -rf cert
```
2 changes: 0 additions & 2 deletions tools/pd-simulator/simulator/drive.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,6 @@ func (d *Driver) RegionsHeartbeat(ctx context.Context) {
healthyNodes[n.Store.GetId()] = true
}
}
report := 0
for _, region := range regions {
hibernatePercent := d.simConfig.HibernatePercent
// using rand(0,100) to meet hibernatePercent
Expand All @@ -280,7 +279,6 @@ func (d *Driver) RegionsHeartbeat(ctx context.Context) {
continue
}
nodesChannel[storeID] <- region.Clone()
report++
}
}

Expand Down

0 comments on commit 0594ffe

Please sign in to comment.