configure method
Configures this GrpcEndpoint using the given configuration parameters.
Configuration parameters:
-
connection(s)
- the connection resolver's connections;- '
connection.discovery_key
' - the key to use for connection resolving in a discovery service; - '
connection.protocol
' - the connection's protocol; - '
connection.host
' - the target host; - '
connection.port
' - the target port; - '
connection.uri
' - the target URI. - '
credential.ssl_key_file
' - SSL key in PEM - '
credential.ssl_crt_file
' - SSL certificate in PEM - '
credential.ssl_ca_file
' - Certificate authority (root certificate) in PEM
- '
-
config
configuration parameters, containing a 'connection(s)' section.
See ConfigParams (in the PipServices 'Commons' package)
Implementation
@override
void configure(ConfigParams config) {
config = config.setDefaults(GrpcEndpoint._defaultConfig);
_connectionResolver.configure(config);
_maintenanceEnabled = config.getAsBooleanWithDefault(
'options.maintenance_enabled', _maintenanceEnabled);
_fileMaxSize =
config.getAsLongWithDefault('options.file_max_size', _fileMaxSize);
}