@@ -2,6 +2,7 @@ package grpcconn
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/google/uuid"
|
||||
@@ -28,3 +29,9 @@ func Call(ctx context.Context, l logger.Logger, c client.Client, addr string, td
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func ServiceMethod(method string) (string, string, string) {
|
||||
idx1 := strings.LastIndex(method, ".")
|
||||
idx2 := strings.Index(method[:idx1], ".")
|
||||
return method[:idx2], method[idx2+1 : idx1], method[idx1+1:]
|
||||
}
|
||||
|
Reference in New Issue
Block a user