Documentation
¶
Overview ¶
Package deploy provides deployment utilities for gorp framework. Provides lightweight SSH command execution helper for deploy workflows. Hides session lifecycle management, returns merged stdout/stderr output.
部署包提供 gorp 框架的部署工具能力。 为部署流程提供轻量级 SSH 命令执行 helper。 把 session 生命周期管理隐藏在一个小工具函数后面。
Package deploy provides deployment utilities for gorp framework. This file provides recursive directory upload support for deploy workflows. Mirrors local directory structures onto remote Unix-like paths through SFTP.
部署包提供 gorp 框架的部署工具能力。 本文件为部署流程提供递归目录上传能力。 通过 SFTP 把本地目录结构镜像到远端 Unix 风格路径。
Package deploy provides deployment utilities for gorp framework. This file provides legacy direct SSH dial helper for older deploy flows. Supports key-based SSH connection setup with known_hosts verification.
部署包提供 gorp 框架的部署工具能力。 本文件为旧部署流程提供直接 SSH 连接 helper。 支持基于私钥和 known_hosts 校验的 SSH 建连。
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunRemote ¶
RunRemote runs one shell command on the remote host and returns the merged output.
RunRemote 在远端机器上执行一条 shell 命令,并返回合并输出。
中文说明: - 每次调用都会新建一个 ssh session,用完即关。 - 返回结果为 stdout/stderr 合并输出,便于上层直接记录部署日志。
Types ¶
type SSHConfig ¶
type SSHConfig struct {
TimeoutSec int `mapstructure:"timeout_sec"`
Hosts map[string]SSHHost `mapstructure:"hosts"`
}
SSHConfig is the legacy SSH config model used by deploy helpers.
SSHConfig 是 deploy 旧路径使用的 SSH 配置结构。
中文说明: - 新代码应优先使用 framework/provider/ssh 中的配置结构和服务。 - 这里仅用于兼容旧调用路径。