public final class GrpcUtils extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CLOUD_DISCOVERY_METADATA_PORT
The cloud discovery metadata key used to identify the grpc port.
|
static String |
DOMAIN_SOCKET_ADDRESS_PREFIX
A constant that defines, the scheme prefix of a Unix domain socket address.
|
static String |
DOMAIN_SOCKET_ADDRESS_SCHEME
A constant that defines, the scheme of a Unix domain socket address.
|
static int |
INTER_PROCESS_DISABLE
The constant for the grpc server port, -1 represents don't start an inter process server.
|
Modifier and Type | Method and Description |
---|---|
static String |
extractDomainSocketAddressPath(String address)
Extracts the domain socket address specific path from the given full address.
|
static String |
extractMethodName(io.grpc.MethodDescriptor<?,?> method)
Extracts the method name from the given method.
|
static String |
extractServiceName(io.grpc.MethodDescriptor<?,?> method)
Extracts the service name from the given method.
|
public static final String DOMAIN_SOCKET_ADDRESS_SCHEME
public static final String DOMAIN_SOCKET_ADDRESS_PREFIX
public static final String CLOUD_DISCOVERY_METADATA_PORT
public static final int INTER_PROCESS_DISABLE
public static String extractDomainSocketAddressPath(String address)
address
- The address to extract it from.IllegalArgumentException
- If the given address is not a valid address.public static String extractServiceName(io.grpc.MethodDescriptor<?,?> method)
method
- The method to get the service name from.MethodDescriptor.extractFullServiceName(String)
,
extractMethodName(MethodDescriptor)
public static String extractMethodName(io.grpc.MethodDescriptor<?,?> method)
method
- The method to get the method name from.extractServiceName(MethodDescriptor)