File tree Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Expand file tree Collapse file tree 1 file changed +47
-0
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,53 @@ async fn main() -> Result<(), Box<dyn Error>> {
3434After successfully connecting to some specified node the driver will fetch topology information about
3535other nodes in this cluster and connect to them as well.
3636
37+ Scylla Serverless is an elastic and dynamic deployment model. When creating a ` Session ` you need to
38+ specify the secure connection bundle as follows:
39+
40+ ``` rust
41+ # extern crate scylla;
42+ # extern crate tokio;
43+ # fn check_only_compiles () {
44+ use std :: path :: Path ;
45+ use std :: error :: Error ;
46+ use scylla :: CloudSessionBuilder ;
47+
48+ #[tokio:: main]
49+ async fn main () -> Result <(), Box <dyn Error >> {
50+ let session = CloudSessionBuilder :: new (Path :: new (" config_data.yaml" ))
51+ . unwrap ()
52+ . build ()
53+ . await
54+ . unwrap ();
55+
56+ Ok (())
57+ }
58+ # }
59+ ```
60+
61+ Note that the bundle file will be provided after the serverless cluster is created. Here is an example of a
62+ configuration file for a serverless cluster:
63+
64+ ``` yaml
65+ datacenters :
66+ datacenter1 :
67+ certificateAuthorityData : CERTIFICATE_DATA
68+ server : 127.0.1.1:9142
69+ nodeDomain : cql.cluster-id.scylla.com
70+ insecureSkipTlsVerify : false
71+ authInfos :
72+ default :
73+ clientCertificateData : CERTIFICATE_DATA
74+ clientKeyData : KEY_DATA
75+ username : scylladb
76+ password : scylladb
77+ contexts :
78+ default :
79+ datacenterName : datacenter1
80+ authInfoName : default
81+ currentContext : default
82+ ` ` `
83+
3784` ` ` eval_rst
3885.. toctree: :
3986 :hidden :
You can’t perform that action at this time.
0 commit comments