Am I supposed to re-use Client instances and how?
#1735
Unanswered
mickvangelderen
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
It is not immediately obvious from the documentation of the
Clientstruct whether I am supposed to create aClientfor every request from aConfiginstance,clone()an existing instance of do something else.What makes me wonder in particular is caused by the
Api::default_namespaced(client)call which takes the client by value. My mental model of a generic API client is that it establishes a persistent connection over which we can send/receive multiple different requests. It seems like I should be able to talk to multiple differentApis through the sameClient. It is likely I made some wrong assumptions here.Any advice or insights?
Beta Was this translation helpful? Give feedback.
All reactions