You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If one wants to run the same set of endpoints in multiple servers (e.g., in the example added in #543), one awkward corner of dropshot's API is that ApiDescription is not cloneable, so it must be recreated from scratch for each server instance. A couple possibilities, neither of which is trivial to implement:
We could implement Clone for ApiDescription, but it can't be derived (and many of the types that would also need to implement Clone cannot either) because doing so would require the server context to be cloneable, but that isn't actually necessary to clone the description.
We could find a way to sprinkle in some Arcs to allow sharing an ApiDescription between multiple servers. It's not immediately obvious how to do this due to ApiDescription::into_router() consuming the ApiDescription.
The text was updated successfully, but these errors were encountered:
If one wants to run the same set of endpoints in multiple servers (e.g., in the example added in #543), one awkward corner of dropshot's API is that
ApiDescription
is not cloneable, so it must be recreated from scratch for each server instance. A couple possibilities, neither of which is trivial to implement:Clone
forApiDescription
, but it can't be derived (and many of the types that would also need to implementClone
cannot either) because doing so would require the server context to be cloneable, but that isn't actually necessary to clone the description.Arc
s to allow sharing anApiDescription
between multiple servers. It's not immediately obvious how to do this due toApiDescription::into_router()
consuming theApiDescription
.The text was updated successfully, but these errors were encountered: