-
-
Notifications
You must be signed in to change notification settings - Fork 325
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
sans-io Client #406
Comments
Hmm, I guess my definition of sans-io was off. I thought it meant abstracting
I agree.
Can't be arbitrary, but But this requires
It's currently just indirect.
|
To clarify on the points raised:
I don't think it's tied to
Logic to refresh token should be moved to a
See the previous comment.
I think we'll need it for working with |
I am being a bit absolutist in interpreting sans-io at the moment, partly for the sake clear module boundaries, but also for seeing if it's possible and worth doing. I'm not fully convinced it's a good idea or necessary to go all the way on it. Whether or not it's worth going further depends largely on what kind of testing stories we can get from the it. I doubt actually replacing
Interesting, sound like this would effectively encapsulate the protocol almost like a codec then?
hmm, that sounds nice. Maybe it's worth it 🤔
Ah. Ok. Yeah, that's a little unwieldy for little benefit. It's also interesting that I wasn't sure how feasible a lot of this was, and so far it sounds like it's a bit painful, and it's not clear if we can get much by doing it yet. Thanks for your thoughts on all of these points. |
It doesn't. But I think we should continue to use functions from |
I was thinking |
Closing in favour of of #429. A lot of this has been addressed and a lot of it is too nebulous without reason. The most relevant parts herein is the consequences of potentially having |
Now that we use tower (#100 via #394), it's worth at least considering what remains to get the
kube::Api
to a complete sans-io state.(Going to resume this from the closed discussions in #204 and #112, both of which are too tangential at this point.)
Currently, we have three main structs:
Config
: kubernetes config from disk, environment, plus optional oauth mechanicsService
: a route through which every api request goes (our one embeds a hyper client)Client
: an object taking wire data, and routes them through aService
, then deals with the resulting result. However, it also deals with connection upgrading, service routing + error handling of thatService
, and CodecsAt the moment we are pretty close to having
Client
be agnostic to the underlyinghyper::Client
, but there are some things that are tied together still:Client
error handling handles errors related to theService
's implementation (hyper::Error
)Client
connection upgrading tied toService
's implementation (hyper::upgrade
)oauth
(while optional) piggy-backs on the chosen tls stackapi::remote_command
needs ahyper::upgrade
for itsWebSocketStream
Client
is hard-coded to a statickube::Service
rather than adyn Tower::Service
kube::Error
has explicithyper::Error
casesPossibly there are more, but to me, it sounds like a lot of these could be confined to the
service
module or an equivalent feature, or by being more generic. I.e.:Service
requirement onClient
to allow an arbitrarytower::Service
WebSocketStream
, or if that fails, moving their handling toservice
directlyService
error handling something aService
should implementService
implementation, and things tied to it behind aservice-hyper
featureThe text was updated successfully, but these errors were encountered: