File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -39,3 +39,8 @@ crate-type = ["staticlib"]
3939name = " persistent_subscriptions"
4040path = " persistent_subscriptions.rs"
4141crate-type = [" staticlib" ]
42+
43+ [[example ]]
44+ name = " user_certificates"
45+ path = " user_certificates.rs"
46+ crate-type = [" staticlib" ]
Original file line number Diff line number Diff line change 1+ #![ allow( unused_attributes) ]
2+ #![ allow( unused_imports) ]
3+ #![ allow( unused_results) ]
4+ #![ allow( unused_variables) ]
5+ #![ allow( unreachable_code) ]
6+
7+ use std:: error:: Error ;
8+ use kurrentdb:: Client ;
9+
10+ type Result < A > = std:: result:: Result < A , Box < dyn Error > > ;
11+
12+ pub async fn user_certificates ( ) -> Result < ( ) > {
13+ // region client-with-user-certificates
14+ let settings = "kurrentdb://admin:changeit@{endpoint}?tls=true&userCertFile={pathToCaFile}&userKeyFile={pathToKeyFile}" . parse ( ) ?;
15+ let client = Client :: new ( settings) ?;
16+ // endregion client-with-user-certificates
17+
18+ Ok ( ( ) )
19+ }
You can’t perform that action at this time.
0 commit comments