barrage_session
The barrage_session function creates a new BarrageSession, a Deephaven gRPC session to a remote server. Each call opens a new gRPC channel.
Syntax
Parameters
| Parameter | Type | Description |
|---|---|---|
| host | str | The host name or IP address of the Deephaven server. |
| port optional | int | The port number that the remote Deephaven server is listening on. The default value is |
| auth_type optional | str | The authentication type string. Can be |
| auth_token optional | str | The authentication token string. When |
| use_tls optional | bool | If |
| tls_root_certs optional | bytes | The PEM-encoded root certificates to use for TLS connection, or |
| extra_headers optional | dict[str, str] | Extra headers to set when configuring the gRPC channel. Defaults to |
Returns
Examples
Note
The first three examples use the default anonymous authentication, so the server must accept anonymous authentication. A default Deephaven server uses pre-shared key authentication instead; for that, pass auth_type and auth_token as the last example does.
The following example creates a BarrageSession on a Deephaven server running on localhost at port 10000.
The following example connects to a BarrageSession on a Deephaven server running on localhost at port 9999. This example will fail unless there is already a Deephaven server running on localhost at port 9999.
The following example connects to a Deephaven server running on a remote host at IP address 192.0.2.1 and port 10000. This example will fail unless there is already a Deephaven server running at the specified IP address and port.
The following example connects to a Deephaven server running on localhost at port 9999, with pre-shared-key (PSK) authentication. This example will fail unless there is already a Deephaven server running on localhost at port 9999, with matching PSK authentication.