sift_connect
sift_connect is a convenience crate that makes it simple to create a gRPC connection to
Sift. Most users won't need to install this crate as it's re-exported in other crates. The
following is an example of how to create a gRPC connection to Sift using sane defaults.
use ;
use env;
let credentials = Config ;
let grpc_conn = new
.build
.unwrap;
Configuration File
Credentials can also be loaded from a sift.toml file stored in a the user's local config
directory.
The following is an example of a valid sift.toml file:
= "http://example-sift-api.com"
= "example-sift-api-key"
[]
= "http://example-sift-api.com"
= "my-other-sift-api-key"
The top-level TOML table is considered the default profile, with the mission table being a
named profile. To reference the default profile:
use ;
use env;
let credentials = Profile;
let grpc_conn = new
.build
.unwrap;
To reference the mission profile:
use ;
use env;
let credentials = Profile;
let grpc_conn = new
.build
.unwrap;