// Package port defines interfaces (ports) for external dependencies. package port import "context" // PreviewManager manages ephemeral preview URLs via K8s Service + Ingress. type PreviewManager interface { // CreatePreview creates a K8s Service + Ingress for the session preview. // The service routes traffic to the target pod on the specified port. CreatePreview(ctx context.Context, opts PreviewOptions) error // DeletePreview removes the K8s Service + Ingress for a session preview. DeletePreview(ctx context.Context, sessionID string) error } // PreviewOptions configures an ephemeral preview. type PreviewOptions struct { // SessionID is used as the resource name prefix (e.g., "session-{id}"). SessionID string // Namespace is the K8s namespace (typically "rdev"). Namespace string // PodName is the target pod to route traffic to. PodName string // Host is the preview hostname (e.g., "abc123.preview.threesix.ai"). Host string // Port is the target port on the pod (default: 8080). Port int }