Backend: API handlers, WebSocket manager, K8s client, CRDT, auth
This commit is contained in:
24
server/internal/k8s/watch.go
Normal file
24
server/internal/k8s/watch.go
Normal file
@@ -0,0 +1,24 @@
|
||||
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{})
|
||||
}
|
||||
Reference in New Issue
Block a user