Dynamic Reflector support #1135
night-crawler
started this conversation in
General
Replies: 1 comment
-
Hey there! The |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
Hi.
Currently, I'm trying to create a dynamic reflector for a
CRD
. The problem is that I don't know CRD's GVK in compile time, so I can't create a struct the usual way.Here comes the next approach with creating a reflector of a DynamicObject. The problem here is that
reflector::store()
requiresK
implementing theDefault
trait, thoughdiscovery::ApiResource
does not implement it at the moment. The snippet below does not compile, though after patchingApiResource
derives withDefault
, it does.Is there any other way to create a dynamic reflector without patching? If no, can
Default
be added to theApiResource
implementation?Many thanks.
Beta Was this translation helpful? Give feedback.
All reactions