Files
fn_registry/functions/infra/ssh_tunnel_close.md
T
egutierrez 560cbf280e feat: funciones SSH para infra — conn, check, exec, download, upload, tunnel
Conjunto completo de funciones SSH para operaciones remotas: conexión,
verificación de host, ejecución de comandos, transferencia de archivos
(upload/download) y gestión de túneles. Incluye tipo SSHConn y tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 22:03:41 +02:00

815 B

name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, tested, tests, test_file_path, file_path
name kind lang domain version purity signature description tags uses_functions uses_types returns returns_optional error_type imports tested tests test_file_path file_path
ssh_tunnel_close function go infra 1.0.0 impure func SSHTunnelClose(pid int) error Cierra un tunel SSH enviando SIGTERM al proceso por PID.
ssh
tunnel
close
remote
false error_go_core
fmt
os
syscall
true
abre tunel y lo cierra
functions/infra/ssh_tunnel_test.go functions/infra/ssh_tunnel_close.go

Ejemplo

// Abrir tunel
pid, _ := SSHTunnelOpen(conn, 5432, "db-server", 5432)
// ... usar el tunel ...
// Cerrar
err := SSHTunnelClose(pid)

Notas

Envia SIGTERM (cierre limpio) al proceso ssh. El PID viene de SSHTunnelOpen. Si el proceso ya termino, retorna error.