-
Notifications
You must be signed in to change notification settings - Fork 1
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
Allow exposing multiple entries #7
Comments
I think maybe you could just reexport it no? |
nm I thought you were trying to export same var as multiple names... sometimes that makes sense too, but in trying to figure out how a thread-pool could be a ring handler I realized you weren't trying to alias the same object but to export values from a result vector. I guess you could name the vector and then extract each in turn, but a less verbose method seems useful. (defconst ^:expose ring-handler [^:inject instrumentation-result] (first instrumentation-result)) |
@kurtharriger Yes, this can be achieved in an indirect way as you described, and as you observed this feature-request will make it less verbose. Allowing direct exposure of specific named entries would hopefully provide the following benefits:
For reference, I was recently working on web server thread-pool instrumentation and realized Dime could use this enhancement to make things smoother. |
Currently,
^:expose
exposes only one object/entry. In some cases, initialization functions (e.g. instrumentation functions that produce instrumented thread-pool/Ring-handler pair) may produce more than one entry to be exposed and used together.The
^:expose
metadata should allow a vector of entries, e.g.^{:expose [:thread-pool :ring-handler]}
. This may be applicable only with singleton-producing fns, typically annotated with{:post-inject dime.util/post-inject-invoke}
.The text was updated successfully, but these errors were encountered: