【文件属性】:
文件名称:重启服务
文件大小:25KB
文件格式:ZIP
更新时间:2021-02-18 01:03:28
Go
重启API
该API允许在M-Lab平台的BMC模块和CoreOS主机上执行常规操作。
它从Google Cloud Datastore检索BMC的凭据,而通过私有SSH密钥授予对CoreOS主机的访问权限。
使用重新启动API重新启动节点
该API提供了一个重启端点/v1/reboot ,它允许使用两种不同的方法来重启节点。
开机自检/ v1 /重新启动
范围
描述
host
重启主机名
method
host或bmc 。 默认为bmc 。
例子
通过BMC重新启动mlab1.lga0t:
curl -X POST https:// < reboot> /v1/reboot ? host=mlab1.lga0t
通过在CoreOS上运行systemctl reboot来重新启动mlab1.lga0t:
curl -X POST https:// < reb
【文件预览】:
reboot-service-master
----main.go(6KB)
----creds()
--------credstest()
--------provider.go(4KB)
--------provider_test.go(7KB)
--------connector.go(1KB)
--------connector_test.go(199B)
----reboot()
--------handler.go(6KB)
--------handler_test.go(5KB)
----Dockerfile(475B)
----.travis.yml(243B)
----connector()
--------connector.go(6KB)
--------dialer.go(1KB)
--------connector_test.go(6KB)
----README.md(4KB)
----.gitignore(223B)
----e2e()
--------collector.go(2KB)
--------handler.go(2KB)
--------collector_test.go(4KB)
--------handler_test.go(3KB)