This module contains functions that are common to client and server
code. None of them should be used directly by gRPC users.
- Source:
Methods
(static) deserializeCls(cls) → {function}
Get a function that deserializes a specific type of protobuf.
Parameters:
Name | Type | Description |
---|---|---|
cls |
function | The constructor of the message type to deserialize |
- Source:
Returns:
The deserialization function
- Type
- function
(static) fullyQualifiedName(value) → {string}
Get the fully qualified (dotted) name of a ProtoBuf.Reflect value.
Parameters:
Name | Type | Description |
---|---|---|
value |
ProtoBuf.Reflect.Namespace | The value to get the name of |
- Source:
Returns:
The fully qualified name of the value
- Type
- string
(static) getProtobufServiceAttrs(service) → {Object}
Return a map from method names to method attributes for the service.
Parameters:
Name | Type | Description |
---|---|---|
service |
ProtoBuf.Reflect.Service | The service to get attributes for |
- Source:
Returns:
The attributes map
- Type
- Object
(static) serializeCls(Cls) → {function}
Get a function that serializes objects to a buffer by protobuf class.
Parameters:
Name | Type | Description |
---|---|---|
Cls |
function | The constructor of the message type to serialize |
- Source:
Returns:
The serialization function
- Type
- function
(static) wrapIgnoreNull(funcnullable) → {function}
Wrap a function to pass null-like values through without calling it. If no
function is given, just uses the identity;
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
func |
function |
<nullable> |
The function to wrap |
- Source:
Returns:
The wrapped function
- Type
- function