-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RSDK-9194: streamline app connection #4516
base: main
Are you sure you want to change the base?
RSDK-9194: streamline app connection #4516
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Quick question - how are we going to implement the interfaces for other clients, such as DataClient
and BillingClient
, here? (In the Python sdk, we define data_client as a property of the ViamClient class). I'm not sure if this is outside the scope of this PR, but I just want to clarify our approach moving forward :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a question about our approach towards building out the other clients w/ respect to ViamClient
(but again maybe that is out of scope of this ticket) so LGTM.
Similarly, the other clients would be part of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better if there was an Options
struct that contained 2 fields: BaseUri string
and Credentials rpc.Credentials
. Then, have a func WithOptions
that takes in these options.
What I think can be improved from the current version is that baseURL
has to always be specified, even if just to be an empty string. Plus, there might be more ways in the future of connecting to app that this allows for.
And nothing is stopping us from making convenience functions like FromApiKey
so that the user can use API Keys instead of Options
Jira ticket
Changes:
app/
ViamClient
structCreateViamClient
, which takes in api key for credentialsTesting: