16 ViamChannel(std::shared_ptr<grpc::Channel> channel,
const char* path,
void* runtime);
17 static std::shared_ptr<ViamChannel> dial(
const char* uri,
18 const boost::optional<DialOptions>& options);
20 const std::shared_ptr<grpc::Channel>& channel()
const;
23 std::shared_ptr<grpc::Channel> channel_;
46 const boost::optional<Credentials>& credentials()
const;
47 const boost::optional<std::string>& entity()
const;
48 bool allows_insecure_downgrade()
const;
49 const std::chrono::duration<float>& timeout()
const;
51 void set_entity(boost::optional<std::string> entity);
52 void set_credentials(boost::optional<Credentials> creds);
53 void set_allow_insecure_downgrade(
bool allow);
54 void set_timeout(std::chrono::duration<float> timeout);
61 boost::optional<std::string> auth_entity_;
64 boost::optional<Credentials> credentials_;
68 bool allow_insecure_downgrade_ =
false;
72 std::chrono::duration<float> timeout_{20};
77 Options(
unsigned int refresh_interval, boost::optional<DialOptions> dial_options)
78 : refresh_interval_(std::move(refresh_interval)), dial_options_(std::move(dial_options)) {}
80 unsigned int refresh_interval()
const;
81 const boost::optional<DialOptions>& dial_options()
const;
86 unsigned int refresh_interval_;
87 boost::optional<DialOptions> dial_options_;