本文整理汇总了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 {