mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 02:43:36 +00:00
internal: reformat long lines in internal/csi-common package to 120 chars
We have many declarations and invocations..etc with long lines which are very difficult to follow while doing code reading. This address the issues in 'internal/csi-common' package to restrict the line length to 120 chars. Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
This commit is contained in:
committed by
mergify[bot]
parent
f526c4a5e8
commit
a3b83fe8a7
@ -150,7 +150,11 @@ func getReqID(req interface{}) string {
|
||||
|
||||
var id uint64
|
||||
|
||||
func contextIDInjector(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) {
|
||||
func contextIDInjector(
|
||||
ctx context.Context,
|
||||
req interface{},
|
||||
info *grpc.UnaryServerInfo,
|
||||
handler grpc.UnaryHandler) (resp interface{}, err error) {
|
||||
atomic.AddUint64(&id, 1)
|
||||
ctx = context.WithValue(ctx, util.CtxKey, id)
|
||||
if reqID := getReqID(req); reqID != "" {
|
||||
@ -159,7 +163,11 @@ func contextIDInjector(ctx context.Context, req interface{}, info *grpc.UnarySer
|
||||
return handler(ctx, req)
|
||||
}
|
||||
|
||||
func logGRPC(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (interface{}, error) {
|
||||
func logGRPC(
|
||||
ctx context.Context,
|
||||
req interface{},
|
||||
info *grpc.UnaryServerInfo,
|
||||
handler grpc.UnaryHandler) (interface{}, error) {
|
||||
util.ExtendedLog(ctx, "GRPC call: %s", info.FullMethod)
|
||||
if isReplicationRequest(req) {
|
||||
util.TraceLog(ctx, "GRPC request: %s", rp.StripReplicationSecrets(req))
|
||||
@ -176,7 +184,11 @@ func logGRPC(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, h
|
||||
return resp, err
|
||||
}
|
||||
|
||||
func panicHandler(ctx context.Context, req interface{}, info *grpc.UnaryServerInfo, handler grpc.UnaryHandler) (resp interface{}, err error) {
|
||||
func panicHandler(
|
||||
ctx context.Context,
|
||||
req interface{},
|
||||
info *grpc.UnaryServerInfo,
|
||||
handler grpc.UnaryHandler) (resp interface{}, err error) {
|
||||
defer func() {
|
||||
if r := recover(); r != nil {
|
||||
klog.Errorf("panic occurred: %v", r)
|
||||
|
Reference in New Issue
Block a user