本文整理匯總了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
}