18 ViamChannel(std::shared_ptr<GrpcChannel> channel,
const char* path,
void* runtime);
19 static std::shared_ptr<ViamChannel> dial(
const char* uri,
20 const boost::optional<DialOptions>& options);
22 const std::shared_ptr<GrpcChannel>& channel()
const;
25 std::shared_ptr<GrpcChannel> channel_;
48 const boost::optional<Credentials>& credentials()
const;
49 const boost::optional<std::string>& entity()
const;
50 bool allows_insecure_downgrade()
const;
51 const std::chrono::duration<float>& timeout()
const;
53 void set_entity(boost::optional<std::string> entity);
54 void set_credentials(boost::optional<Credentials> creds);
55 void set_allow_insecure_downgrade(
bool allow);
56 void set_timeout(std::chrono::duration<float> timeout);
63 boost::optional<std::string> auth_entity_;
66 boost::optional<Credentials> credentials_;
70 bool allow_insecure_downgrade_ =
false;
74 std::chrono::duration<float> timeout_{20};
79 Options(
unsigned int refresh_interval, boost::optional<DialOptions> dial_options)
80 : refresh_interval_(std::move(refresh_interval)), dial_options_(std::move(dial_options)) {}
82 unsigned int refresh_interval()
const;
83 const boost::optional<DialOptions>& dial_options()
const;
88 unsigned int refresh_interval_;
89 boost::optional<DialOptions> dial_options_;