本文整理汇总了Golang中github.com/openshift/origin/pkg/bootstrap/docker/openshift.MetricsHost函数的典型用法代码示例。如果您正苦于以下问题:Golang MetricsHost函数的具体用法?Golang MetricsHost怎么用?Golang MetricsHost使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了MetricsHost函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: InstallMetrics
func (c *ClientStartConfig) InstallMetrics(out io.Writer) error {
f, err := c.Factory()
if err != nil {
return err
}
return c.OpenShiftHelper().InstallMetrics(f, openshift.MetricsHost(c.RoutingSuffix, c.ServerIP), c.Image, c.ImageVersion)
}
示例2: ServerInfo
// ServerInfo displays server information after a successful start
func (c *ClientStartConfig) ServerInfo(out io.Writer) error {
metricsInfo := ""
if c.ShouldInstallMetrics {
metricsInfo = fmt.Sprintf("The metrics service is available at:\n"+
" https://%s\n\n", openshift.MetricsHost(c.RoutingSuffix, c.ServerIP))
}
fmt.Fprintf(out, "OpenShift server started.\n"+
"The server is accessible via web console at:\n"+
" %s\n\n%s"+
"You are logged in as:\n"+
" User: %s\n"+
" Password: %s\n\n"+
"To login as administrator:\n"+
" oc login -u system:admin\n\n",
c.OpenShiftHelper().Master(c.ServerIP),
metricsInfo,
initialUser,
initialPassword)
return nil
}