Files
opencode-krates-connector/server/internal/k8s/watch.go

25 lines
607 B
Go

package k8s
import (
"context"
v1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
type WatchStream struct {
Watcher watch.Interface
StopChan chan struct{}
}
func (c *Client) WatchAllResources(ctx context.Context) (*WatchStream, error) {
// TODO: Implement watch for all resource types
// This will multiplex all watch streams into a single connection
return nil, nil
}
func (c *Client) WatchPodLogs(ctx context.Context, namespace, podName string, follow bool) (watch.Interface, error) {
return c.clientset.CoreV1().Pods(namespace).Watch(ctx, metav1.ListOptions{})
}