Get gRPC connection settings
Gets the settings structure for gRPC connection
- Parameters
- Advanced call ?
Function GetGRPCConnectionSettings(Val Address, Val Authorization = Undefined, Val Meta = Undefined, Val Tls = Undefined) Export
| Parameter | CLI option | Type | Required | Description |
|---|---|---|---|---|
| Address | --url | String | ✔ | Connection address with protocol and port |
| Authorization | --auth | String, Structure Of KeyAndValue | ✖ | Authorization: string for JWT, structure for basic |
| Meta | --meta | Structure Of KeyAndValue | ✖ | gRPC metadata structure, if necessary |
| Tls | --tls | Structure Of KeyAndValue | ✖ | TLS settings. See GetTlsSettings |
Returns
Structure Of KeyAndValue - Connection settings structure
| Parameter | Description |
|---|---|
| dontwait | Creates a background job and returns its data (for 1C and OneScript only) |
1C:Enterprise/OneScript code example
URL = "http://localhost:9101";
// No authorization
Result = OPI_ClickHouse.GetGRPCConnectionSettings(URL);
// With basic authorization
Login = "bayselonarrend";
Password = "12we...";
Authorization = New Structure(Login, Password);
Result = OPI_ClickHouse.GetGRPCConnectionSettings(URL, Authorization);
// With JWT authorization
JWT = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.test";
Result = OPI_ClickHouse.GetGRPCConnectionSettings(URL, JWT);
// With metadata
Meta = New Map;
Meta.Insert("custom-meta", "value");
Result = OPI_ClickHouse.GetGRPCConnectionSettings(URL, Authorization, Meta);
// With TLS settings
Tls = OPI_ClickHouse.GetTlsSettings(True);
Result = OPI_ClickHouse.GetGRPCConnectionSettings(URL, Authorization, , Tls);
- Bash
- CMD/Bat
# JSON data can also be passed as a path to a .json file
oint clickhouse GetGRPCConnectionSettings \
--url "http://127.0.0.1:9101" \
--auth "{'bayselonarrend':'***'}"
:: JSON data can also be passed as a path to a .json file
oint clickhouse GetGRPCConnectionSettings ^
--url "http://127.0.0.1:9101" ^
--auth "{'bayselonarrend':'***'}"
Result
{
"address": "http://host.docker.internal:9101",
"tls": {
"use_tls": true,
"accept_invalid_certs": true
},
"transport": "grpc",
"auth_type": "basic",
"user": "bayselonarrend",
"password": "***"
}