Documentation ¶
Index ¶
- Constants
- func AttachLocalContainer(curveadm *cli.CurveAdm, containerId string) error
- func AttachRemoteContainer(curveadm *cli.CurveAdm, host, containerId, home string) error
- func AttachRemoteHost(curveadm *cli.CurveAdm, host string, become bool) error
- func ExecCmdInRemoteContainer(curveadm *cli.CurveAdm, host, containerId, cmd string) error
- func ExecuteRemoteCommand(curveadm *cli.CurveAdm, host, command string) (string, error)
- func GetLatestVersion(currentVersion string) (string, error)
- func Scp(curveadm *cli.CurveAdm, host, source, target string) error
- func Upgrade(version string) error
- func Upgrade2Latest(currentVersion string) error
- func Upload(filepath string) error
Constants ¶
View Source
const ( TEMPLATE_SCP = `scp -P {{.port}} {{or .options ""}} {{.source}} {{.user}}@{{.host}}:{{.target}}` TEMPLATE_SSH_COMMAND = `ssh {{.user}}@{{.host}} -p {{.port}} {{or .options ""}} {{or .become ""}} {{.command}}` TEMPLATE_SSH_ATTACH = `ssh -tt {{.user}}@{{.host}} -p {{.port}} {{or .options ""}} {{or .become ""}} {{.command}}` TEMPLATE_COMMAND_EXEC_CONTAINER = `{{.sudo}} docker exec -it {{.container_id}} /bin/bash -c "cd {{.home_dir}}; /bin/bash"` TEMPLATE_LOCAL_EXEC_CONTAINER = `docker exec -it {{.container_id}} /bin/bash` // FIXME: merge it TEMPLATE_COMMAND_EXEC_CONTAINER_NOATTACH = `{{.sudo}} docker exec -t {{.container_id}} /bin/bash -c "{{.command}}"` )
View Source
const ( URL_LATEST_VERSION = "http://curveadm.nos-eastchina1.126.net/release/__version" URL_INSTALL_SCRIPT = "http://curveadm.nos-eastchina1.126.net/script/install.sh" HEADER_VERSION = "X-Nos-Meta-Curveadm-Latest-Version" ENV_CURVEADM_UPGRADE = "CURVEADM_UPGRADE" ENV_CURVEADM_VERSION = "CURVEADM_VERSION" )
View Source
const (
URL_UPLOAD_SUPPORT_TARBALL = "http://curveadm.aspirer.wang:19301/upload?path=/"
)
Variables ¶
This section is empty.
Functions ¶
func AttachLocalContainer ¶ added in v0.2.0
func AttachRemoteContainer ¶ added in v0.1.0
func AttachRemoteHost ¶ added in v0.1.0
func ExecCmdInRemoteContainer ¶ added in v0.2.0
func ExecuteRemoteCommand ¶ added in v0.2.0
func GetLatestVersion ¶ added in v0.1.0
func Upgrade2Latest ¶ added in v0.2.0
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.