Provides a ClientFactory in the component system.
Multiple ClientFactoryComponent instances may be created if different parameters are required for different clients.
Authentication
Authentication is controlled by auth-type
static config field. Possible values:
insecure
(InsecureChannelCredentials
- default)
ssl
(SslCredentials
)
Default (system) authentication keys are used regardless of the chosen auth-type.
Service config
As per https://github.com/grpc/grpc/blob/master/doc/service_config.md service config should be distributed via the name resolution process. We allow setting default service_config: pass desired JSON literal to default-service-config
parameter
Static options:
The default component name for static config is "grpc-client-factory"
.
Name | Description | Default value |
task-processor | the task processor for blocking channel creation | - |
channel-args | a map of channel arguments, see gRPC Core docs | {} |
native-log-level | min log level for the native gRPC library | 'error' |
auth-type | authentication method, see above | - |
default-service-config | default service config, see above | - |
channel-count | Number of underlying grpc::Channel objects | 1 |
middlewares | middlewares names to use | [] |
- See also
- https://grpc.github.io/grpc/core/group__grpc__arg__keys.html
- Examples
- samples/grpc_service/grpc_service.cpp.
Definition at line 57 of file client_factory_component.hpp.