mirror of
https://github.com/imjasonh/client-go2
synced 2026-07-12 10:58:36 +00:00
This major refactoring eliminates the dependency on the dynamic client and unstructured types, using rest.RESTClient directly for all operations. Key changes: - Replace dynamic.Interface with rest.RESTClient in client struct - Remove all unstructured.Unstructured conversions - Use direct JSON marshaling/unmarshaling for type conversions - Update all CRUD methods (List, Get, Create, Update, Delete, Patch) - Reimplement Inform to use cache.ListWatch with rest client - Export Client type and update method signatures - Add proper GroupVersion and APIPath configuration in NewClientGVR - Update all tests to use mock HTTP transport instead of fake dynamic client - Fix informer event handler to use new InformerHandler type - Update example code to demonstrate new API Benefits: - More efficient: eliminates unnecessary type conversions - Cleaner code: direct use of REST client - Better performance: reduced JSON marshaling overhead - Type safety maintained through generics All unit tests and e2e tests pass against a real Kubernetes cluster. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| client.go | ||
| client_test.go | ||
| e2e_test.go | ||