chitralverma commented on issue #7904:
URL: https://github.com/apache/opendal/issues/7904#issuecomment-4955841415

   > - is a scheme available (your issue)
   > - what services a scheme binds to
   > - what schemes a service supports
   
   Agreed on all three. I'd suggest landing #7908 as-is (API 1: `schemes()` + 
the error hint) and doing APIs 2 and 3 as a follow-up, since they need the 
registry to carry service identity, which it doesn't today.
   
   The registry map is built entirely inside `register::<B>(scheme)`, so the 
natural place to capture that identity is right there — store a service name 
per scheme instead of just the factory. The cleanest source is a stable `const` 
on the `Builder`/`Configurator` trait (each service already has its canonical 
name, e.g. `S3_SCHEME`, `COS_SCHEME`), rather than `std::any::type_name`, which 
is explicitly non-stable and would need munging. With the name in the map, both 
APIs fall out cheaply — `service_for_scheme` and `schemes_for_service` (e.g. 
`cos` → {`cos`, `cosn`}).
   
   Happy to take the follow-up. Keep #7908 minimal and track the mapping 
separately?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to