mirror of
https://github.com/imjasonh/client-go2
synced 2026-07-08 00:55:56 +00:00
This PR adds support for resource-specific expansion methods and implements
missing standard client-go operations to achieve feature parity.
## New Features
### Expansion Methods
- Added PodClient with methods: GetLogs, Bind, Evict, ProxyGet
- Added ServiceClient with method: ProxyGet
- Both clients implement the official k8s.io/client-go expansion interfaces
- Runtime type assertions ensure type safety (panic if wrong type)
### Missing Standard Methods
- Watch: Watch resources with optional label/field selectors
- DeleteCollection: Delete multiple resources matching criteria
- UpdateStatus: Update only the status subresource
### Other Improvements
- Refactored all tests to use inline configuration pattern
- Added comprehensive e2e tests for new functionality
- Updated documentation with examples
- Fixed linting error in stream.Close() handling
## Design Decisions
The expansion methods follow a namespace-scoped pattern where calling
`client.PodClient("namespace")` returns a client that implements the
standard client-go PodExpansion interface. This maintains full API
compatibility while providing type safety through runtime assertions.
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
51 lines
1.9 KiB
Modula-2
51 lines
1.9 KiB
Modula-2
module github.com/imjasonh/client-go2
|
|
|
|
go 1.24.0
|
|
|
|
toolchain go1.24.4
|
|
|
|
require (
|
|
k8s.io/api v0.33.3
|
|
k8s.io/apimachinery v0.33.3
|
|
k8s.io/client-go v0.33.3
|
|
)
|
|
|
|
require (
|
|
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
|
|
github.com/emicklei/go-restful/v3 v3.11.0 // indirect
|
|
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
|
|
github.com/go-logr/logr v1.4.2 // indirect
|
|
github.com/go-openapi/jsonpointer v0.21.0 // indirect
|
|
github.com/go-openapi/jsonreference v0.20.2 // indirect
|
|
github.com/go-openapi/swag v0.23.0 // indirect
|
|
github.com/gogo/protobuf v1.3.2 // indirect
|
|
github.com/google/gnostic-models v0.6.9 // indirect
|
|
github.com/google/go-cmp v0.7.0 // indirect
|
|
github.com/google/uuid v1.6.0 // indirect
|
|
github.com/josharian/intern v1.0.0 // indirect
|
|
github.com/json-iterator/go v1.1.12 // indirect
|
|
github.com/mailru/easyjson v0.7.7 // indirect
|
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
|
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
|
|
github.com/pkg/errors v0.9.1 // indirect
|
|
github.com/spf13/pflag v1.0.5 // indirect
|
|
github.com/x448/float16 v0.8.4 // indirect
|
|
golang.org/x/net v0.38.0 // indirect
|
|
golang.org/x/oauth2 v0.27.0 // indirect
|
|
golang.org/x/sys v0.31.0 // indirect
|
|
golang.org/x/term v0.30.0 // indirect
|
|
golang.org/x/text v0.23.0 // indirect
|
|
golang.org/x/time v0.9.0 // indirect
|
|
google.golang.org/protobuf v1.36.5 // indirect
|
|
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
|
|
gopkg.in/inf.v0 v0.9.1 // indirect
|
|
gopkg.in/yaml.v3 v3.0.1 // indirect
|
|
k8s.io/klog/v2 v2.130.1 // indirect
|
|
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect
|
|
k8s.io/utils v0.0.0-20241104100929-3ea5e8cea738 // indirect
|
|
sigs.k8s.io/json v0.0.0-20241010143419-9aa6b5e7a4b3 // indirect
|
|
sigs.k8s.io/randfill v1.0.0 // indirect
|
|
sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect
|
|
sigs.k8s.io/yaml v1.4.0 // indirect
|
|
)
|