mirror of
https://github.com/TECHNOFAB11/zfs-localpv.git
synced 2025-12-12 06:20:11 +01:00
refact(pkg): Removes unused import, variables and functions. (#321)
Signed-off-by: Rahul Grover <rahulgrover99@gmail.com>
This commit is contained in:
parent
0e6a02ea74
commit
a8376796b7
7 changed files with 10 additions and 36 deletions
|
|
@ -41,7 +41,7 @@ func parseEndpoint(ep string) (string, string, error) {
|
|||
return s[0], s[1], nil
|
||||
}
|
||||
}
|
||||
return "", "", fmt.Errorf("Invalid endpoint: %v", ep)
|
||||
return "", "", fmt.Errorf("invalid endpoint: %v", ep)
|
||||
}
|
||||
|
||||
//filters if the logd are informative or pollutant
|
||||
|
|
@ -68,13 +68,13 @@ func isInfotrmativeLog(info string) bool {
|
|||
func logGRPC(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
|
||||
|
||||
log := isInfotrmativeLog(info.FullMethod)
|
||||
if log == true {
|
||||
if log {
|
||||
klog.Infof("GRPC call: %s requests %s", info.FullMethod, protosanitizer.StripSecrets(req))
|
||||
}
|
||||
|
||||
resp, err := handler(ctx, req)
|
||||
|
||||
if log == true {
|
||||
if log {
|
||||
if err != nil {
|
||||
klog.Errorf("GRPC error: %v", err)
|
||||
} else {
|
||||
|
|
@ -127,7 +127,6 @@ func (s *nonBlockingGRPCServer) Start() {
|
|||
|
||||
go s.serve(s.endpoint, s.idntyServer, s.ctrlServer, s.agentServer)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// Wait for the service to stop
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue