本文整理匯總了Golang中github.com/openshift/origin/pkg/api/graph.Markers.FilterByNamespace方法的典型用法代碼示例。如果您正苦於以下問題:Golang Markers.FilterByNamespace方法的具體用法?Golang Markers.FilterByNamespace怎麽用?Golang Markers.FilterByNamespace使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/openshift/origin/pkg/api/graph.Markers
的用法示例。
在下文中一共展示了Markers.FilterByNamespace方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: Describe
//.........這裏部分代碼省略.........
for _, standaloneDC := range standaloneDCs {
fmt.Fprintln(out)
printLines(out, indent, 0, describeDeploymentInServiceGroup(f, standaloneDC)...)
}
for _, standaloneImage := range standaloneImages {
fmt.Fprintln(out)
lines := describeStandaloneBuildGroup(f, standaloneImage, namespace)
lines = append(lines, describeAdditionalBuildDetail(standaloneImage.Build, standaloneImage.LastSuccessfulBuild, standaloneImage.LastUnsuccessfulBuild, standaloneImage.ActiveBuilds, standaloneImage.DestinationResolved, true)...)
printLines(out, indent, 0, lines...)
}
for _, standaloneRC := range standaloneRCs {
fmt.Fprintln(out)
printLines(out, indent, 0, describeRCInServiceGroup(f, standaloneRC.RC)...)
}
monopods, err := filterBoringPods(standalonePods)
if err != nil {
return err
}
for _, monopod := range monopods {
fmt.Fprintln(out)
printLines(out, indent, 0, describeMonopod(f, monopod.Pod)...)
}
allMarkers := osgraph.Markers{}
allMarkers = append(allMarkers, createForbiddenMarkers(forbiddenResources)...)
for _, scanner := range getMarkerScanners(d.LogsCommandName, d.SecurityPolicyCommandFormat, d.SetProbeCommandName) {
allMarkers = append(allMarkers, scanner(g, f)...)
}
// TODO: Provide an option to chase these hidden markers.
allMarkers = allMarkers.FilterByNamespace(namespace)
fmt.Fprintln(out)
sort.Stable(osgraph.ByKey(allMarkers))
sort.Stable(osgraph.ByNodeID(allMarkers))
errorMarkers := allMarkers.BySeverity(osgraph.ErrorSeverity)
errorSuggestions := 0
if len(errorMarkers) > 0 {
fmt.Fprintln(out, "Errors:")
for _, marker := range errorMarkers {
fmt.Fprintln(out, indent+"* "+marker.Message)
if len(marker.Suggestion) > 0 {
errorSuggestions++
if d.Suggest {
switch s := marker.Suggestion.String(); {
case strings.Contains(s, "\n"):
fmt.Fprintln(out)
for _, line := range strings.Split(s, "\n") {
fmt.Fprintln(out, indent+" "+line)
}
case len(s) > 0:
fmt.Fprintln(out, indent+" try: "+s)
}
}
}
}
}
warningMarkers := allMarkers.BySeverity(osgraph.WarningSeverity)
if len(warningMarkers) > 0 {
if d.Suggest {