Documentation
¶
Overview ¶
Package filesystem is the filesystem-backed implementation of the unified muster client interface defined in the parent client package. Each muster CRD is stored as a YAML file under per-resource-type folders rooted at basePath. See ../doc.go for the full architecture.
Index ¶
- type Client
- func (f *Client) Apply(ctx context.Context, obj runtime.ApplyConfiguration, ...) error
- func (f *Client) Close() error
- func (f *Client) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
- func (f *Client) CreateEvent(ctx context.Context, obj client.Object, reason, message, eventType string) error
- func (f *Client) CreateEventForCRD(ctx context.Context, ...) error
- func (f *Client) CreateMCPServer(_ context.Context, server *musterv1alpha1.MCPServer) error
- func (f *Client) CreateWorkflow(_ context.Context, w *musterv1alpha1.Workflow) error
- func (f *Client) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
- func (f *Client) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
- func (f *Client) DeleteMCPServer(_ context.Context, name, _ string) error
- func (f *Client) DeleteWorkflow(_ context.Context, name, _ string) error
- func (f *Client) Get(ctx context.Context, key types.NamespacedName, obj client.Object, ...) error
- func (f *Client) GetMCPServer(_ context.Context, name, _ string) (*musterv1alpha1.MCPServer, error)
- func (f *Client) GetWorkflow(_ context.Context, name, _ string) (*musterv1alpha1.Workflow, error)
- func (f *Client) GroupVersionKindFor(obj runtime.Object) (schema.GroupVersionKind, error)
- func (f *Client) IsKubernetesMode() bool
- func (f *Client) IsObjectNamespaced(obj runtime.Object) (bool, error)
- func (f *Client) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
- func (f *Client) ListMCPServers(_ context.Context, _ string) ([]musterv1alpha1.MCPServer, error)
- func (f *Client) ListWorkflows(_ context.Context, _ string) ([]musterv1alpha1.Workflow, error)
- func (f *Client) Patch(ctx context.Context, obj client.Object, patch client.Patch, ...) error
- func (f *Client) QueryEvents(ctx context.Context, options api.EventQueryOptions) (*api.EventQueryResult, error)
- func (f *Client) RESTMapper() meta.RESTMapper
- func (f *Client) Scheme() *runtime.Scheme
- func (f *Client) Status() client.StatusWriter
- func (f *Client) SubResource(subResource string) client.SubResourceClient
- func (f *Client) Update(ctx context.Context, obj client.Object, opts ...client.UpdateOption) error
- func (f *Client) UpdateMCPServer(_ context.Context, server *musterv1alpha1.MCPServer) error
- func (f *Client) UpdateMCPServerStatus(ctx context.Context, server *musterv1alpha1.MCPServer) error
- func (f *Client) UpdateWorkflow(_ context.Context, w *musterv1alpha1.Workflow) error
- func (f *Client) UpdateWorkflowStatus(ctx context.Context, w *musterv1alpha1.Workflow) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a filesystem-backed implementation of the muster client interface.
Files live directly under per-resource-type folders (no namespace subdirectories):
- MCPServers: {basePath}/mcpservers/{name}.yaml
- Workflows: {basePath}/workflows/{name}.yaml
Per-domain CRUD methods live in sibling files (mcpserver.go, workflow.go, events.go). This file keeps the type, the controller-runtime Client interface methods, shared helpers, and the sub-resource writer types.
func New ¶
New returns a filesystem-backed Client rooted at basePath. An empty basePath defaults to the current working directory.
func (*Client) Apply ¶
func (f *Client) Apply(ctx context.Context, obj runtime.ApplyConfiguration, opts ...client.ApplyOption) error
Apply is unsupported (filesystem has no server-side apply).
func (*Client) CreateEvent ¶
func (f *Client) CreateEvent(ctx context.Context, obj client.Object, reason, message, eventType string) error
CreateEvent logs an event for the given object in filesystem mode.
func (*Client) CreateEventForCRD ¶
func (f *Client) CreateEventForCRD(ctx context.Context, crdType, name, namespace, reason, message, eventType string) error
CreateEventForCRD logs an event for a CRD by type, name, and namespace in filesystem mode.
func (*Client) CreateMCPServer ¶
func (*Client) CreateWorkflow ¶
func (*Client) DeleteAllOf ¶
func (f *Client) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
DeleteAllOf is unsupported.
func (*Client) DeleteMCPServer ¶
func (*Client) DeleteWorkflow ¶
func (*Client) Get ¶
func (f *Client) Get(ctx context.Context, key types.NamespacedName, obj client.Object, opts ...client.GetOption) error
Get retrieves a resource by name and namespace (implements client.Client interface).
func (*Client) GetMCPServer ¶
func (*Client) GetWorkflow ¶
func (*Client) GroupVersionKindFor ¶
GroupVersionKindFor returns the GroupVersionKind for an object.
func (*Client) IsKubernetesMode ¶
IsKubernetesMode returns false since this is the filesystem implementation.
func (*Client) IsObjectNamespaced ¶
IsObjectNamespaced — all muster resources are namespaced.
func (*Client) List ¶
func (f *Client) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error
List retrieves a list of resources (implements client.Client interface).
func (*Client) ListMCPServers ¶
func (*Client) ListWorkflows ¶
func (*Client) Patch ¶
func (f *Client) Patch(ctx context.Context, obj client.Object, patch client.Patch, opts ...client.PatchOption) error
Patch falls back to Update — filesystem can't compute a partial patch.
func (*Client) QueryEvents ¶
func (f *Client) QueryEvents(ctx context.Context, options api.EventQueryOptions) (*api.EventQueryResult, error)
QueryEvents retrieves events based on filtering options from filesystem storage.
func (*Client) RESTMapper ¶
func (f *Client) RESTMapper() meta.RESTMapper
RESTMapper returns nil — filesystem mode doesn't need REST mapping.
func (*Client) Status ¶
func (f *Client) Status() client.StatusWriter
Status returns a status writer (implements client.Client interface).
func (*Client) SubResource ¶
func (f *Client) SubResource(subResource string) client.SubResourceClient
SubResource returns a sub-resource client (implements client.Client interface).
func (*Client) UpdateMCPServer ¶
func (*Client) UpdateMCPServerStatus ¶
UpdateMCPServerStatus rewrites the entire YAML — filesystem mode embeds status alongside spec, so there is no separate status sub-resource.
func (*Client) UpdateWorkflow ¶
func (*Client) UpdateWorkflowStatus ¶
UpdateWorkflowStatus rewrites the entire YAML — filesystem mode embeds status alongside spec, so there is no separate status sub-resource.