f21664e052
Nuevas funciones infra para deploy sin Docker: generación de units systemd (pura), instalación/restart/status de servicios remotos via SSH, setup inicial de VPS (crear dirs, usuario, permisos), y pipelines de deploy completo (setup_vps_app, deploy_app_remote). Incluye tipo DeployConfig con la configuración de deploy por app.
1007 B
1007 B
name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, params, output, 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 | params | output | tested | tests | test_file_path | file_path | |||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| systemd_restart | function | go | infra | 1.0.0 | impure | func SystemdRestart(conn SSHConn, unitName string) error | Reinicia un servicio systemd en un host remoto via SSH. |
|
|
|
false | error_go_core |
|
|
nil si el reinicio fue exitoso | false | functions/infra/systemd_restart.go |
Ejemplo
conn := SSHConn{Host: "192.168.1.100", User: "deploy"}
if err := SystemdRestart(conn, "dag_engine"); err != nil {
log.Fatal(err)
}
Notas
Usa sudo systemctl restart. Requiere que el usuario SSH tenga permisos sudo. Si el servicio no existe, systemctl retorna error.