Versions in this module Expand all Collapse all v0 v0.32.1 Apr 13, 2026 v0.32.0 Apr 6, 2026 Changes in this version + const AgentControlPort + const AgentDefaultDeadline + const AgentHealthPort + const AgentImageDefault + func CheckInterceptConflict(kubeconfig, kubeCtx, namespace, service string) error + func ClearSession() error + func EnvPath() (string, error) + func GenerateEnvFile(entries []SessionEntry) error + func GetServiceSelector(kubeconfig, kubeCtx, namespace, service string) (map[string]string, error) + func IsActive() bool + func ListContexts(kubeconfig string) ([]string, error) + func ListServices(kubeconfig, context, namespace string) ([]string, error) + func LoadEnvVars() (map[string]string, error) + func RemoveAgent(kubeconfig, kubeCtx, namespace, sessionID string) error + func ResolveKubeconfig(explicit string) (string, error) + func RestoreServiceSelector(kubeconfig, kubeCtx string, state *ServiceState) error + func SaveSession(session *Session) error + func SessionPath() (string, error) + func ValidateContext(kubeconfig, context string) error + func ValidateInterceptable(info *ServiceInfo) error + func ValidateKubectl() (string, error) + func ValidateService(kubeconfig, context, namespace, service string) error + type AgentConfig struct + AgentImage string + Context string + Deadline int + InterceptPort int + Kubeconfig string + Namespace string + OriginalSelector map[string]string + ServicePorts []ServicePortSpec + SessionID string + TargetService string + type AgentInfo struct + ControlPort int + HealthPort int + PodIP string + PodName string + SessionID string + func DeployAgent(cfg AgentConfig) (*AgentInfo, error) + type InterceptEntry struct + AgentPod string + LocalPort int + Mode string + Namespace string + Origin string + OriginalSelector map[string]string + Service string + SessionID string + StartedAt time.Time + TargetPort int + type PortForward struct + LocalPort int + Namespace string + RemotePort int + Service string + func NewPortForward(kubeconfig, kubeCtx, namespace, service string, remotePort, localPort int) *PortForward + func (pf *PortForward) LastError() error + func (pf *PortForward) LocalAddr() string + func (pf *PortForward) ResolveLocalPort() (string, error) + func (pf *PortForward) Start(ctx context.Context) error + func (pf *PortForward) State() PortForwardState + func (pf *PortForward) StateChannel() <-chan PortForwardState + func (pf *PortForward) Stop() + type PortForwardState int + const StateFailed + const StateHealthy + const StateStarting + const StateStopped + func (s PortForwardState) String() string + type ServiceInfo struct + HasMeshSidecar bool + Name string + Namespace string + Ports []ServicePortSpec + Selector map[string]string + Type string + func InspectService(kubeconfig, kubeCtx, namespace, service string) (*ServiceInfo, error) + type ServicePortSpec struct + Name string + Port int + Protocol string + TargetPort string + type ServiceState struct + Name string + Namespace string + OriginalSelector map[string]string + func PatchServiceSelector(kubeconfig, kubeCtx, namespace, service string, newSelector map[string]string, ...) (*ServiceState, error) + type Session struct + Context string + Entries []SessionEntry + Intercepts []InterceptEntry + Kubeconfig string + StartedAt time.Time + func LoadSession() (*Session, error) + type SessionEntry struct + LocalPort int + Namespace string + Origin string + PID int + RemotePort int + Service string + StartedAt time.Time + State string + type Tunnel struct + func NewTunnel(cfg TunnelConfig) *Tunnel + func (t *Tunnel) Done() <-chan struct{} + func (t *Tunnel) Healthy() bool + func (t *Tunnel) Start(ctx context.Context) error + func (t *Tunnel) Stop() + type TunnelConfig struct + AgentPod string + Context string + ControlPort int + Kubeconfig string + LocalPort int + Namespace string