refactor(client/filesystem): move into internal/client/filesystem subpackage (#140)#621
Merged
Merged
Conversation
571ba8f to
78f8a78
Compare
a87e16b to
11a25c4
Compare
…package (#140) The 1233-line internal/client/filesystem_client.go now lives under internal/client/filesystem/, split per CRD domain: client.go core type + controller-runtime Client interface mcpserver.go MCPServer CRUD serviceclass.go ServiceClass CRUD workflow.go Workflow CRUD events.go Kubernetes Event API The MusterClient interface stays in the parent client package. The only caller of the old NewFilesystemClient was the dispatcher in muster_client.go itself, which now calls filesystem.New(basePath) directly. External consumers depend only on MusterClient and are unaffected. filesystemClient -> filesystem.Client NewFilesystemClient -> filesystem.New(basePath string) *Client filesystemStatusWriter, filesystemSubResourceClient -> unexported
…sertions Adds package-level doc.go pointing back to the parent client package architecture, and var _ assertions so any future drift in controller-runtime client.Client / StatusWriter / SubResourceClient fails at compile time instead of runtime, plus var _ MusterClient at the dispatcher call site.
The subResource string was set on subResourceClient but never read. Pure dead-code cleanup — the rest of the subResourceClient/statusWriter machinery exists solely to satisfy controller-runtime's client.Client interface and has no callers in muster, but removing it requires un-embedding client.Client from MusterClient (deferred).
Contributor
Author
|
Self-review wrap-up — ready for an external pair of eyes. Why this should merge: Pure file move. The 1233-line
Per-CRD duplication is intentional in this PR. mcpserver.go / serviceclass.go / workflow.go are templates differing only in type and resource name string — that's the file-split shape. #627 collapses them into shared CI green. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes part of #140.
Moves the 1233-line
internal/client/filesystem_client.gointo a newinternal/client/filesystem/subpackage, split per CRD domain (client.go,mcpserver.go,serviceclass.go,workflow.go,events.go). Each file is under 400 lines.Pure refactor: the
MusterClientinterface stays in the parentclientpackage and the only direct caller ofNewFilesystemClientwas the in-package dispatcher, which now callsfilesystem.New(basePath)directly. External consumers depend only onMusterClientand are unaffected.Renames:
filesystemClient→filesystem.Client,NewFilesystemClient→filesystem.New(basePath string) *Client, helper writer types (filesystemStatusWriter,filesystemSubResourceClient) unexported now that the package name disambiguates.