本文整理匯總了Golang中github.com/openshift/origin/pkg/image/graph/nodes.EnsureAllImageStreamTagNodes函數的典型用法代碼示例。如果您正苦於以下問題:Golang EnsureAllImageStreamTagNodes函數的具體用法?Golang EnsureAllImageStreamTagNodes怎麽用?Golang EnsureAllImageStreamTagNodes使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了EnsureAllImageStreamTagNodes函數的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: AddToGraph
func (l *isLoader) AddToGraph(g osgraph.Graph) error {
for i := range l.items {
imagegraph.EnsureImageStreamNode(g, &l.items[i])
imagegraph.EnsureAllImageStreamTagNodes(g, &l.items[i])
}
return nil
}
示例2: MakeGraph
func (d *ProjectStatusDescriber) MakeGraph(namespace string) (osgraph.Graph, error) {
g := osgraph.New()
svcs, err := d.K.Services(namespace).List(labels.Everything())
if err != nil {
return g, err
}
iss, err := d.C.ImageStreams(namespace).List(labels.Everything(), fields.Everything())
if err != nil {
return g, err
}
bcs, err := d.C.BuildConfigs(namespace).List(labels.Everything(), fields.Everything())
if err != nil {
return g, err
}
dcs, err := d.C.DeploymentConfigs(namespace).List(labels.Everything(), fields.Everything())
if err != nil {
return g, err
}
builds := &buildapi.BuildList{}
if len(bcs.Items) > 0 {
if b, err := d.C.Builds(namespace).List(labels.Everything(), fields.Everything()); err == nil {
builds = b
}
}
rcs, err := d.K.ReplicationControllers(namespace).List(labels.Everything())
if err != nil {
rcs = &kapi.ReplicationControllerList{}
}
for i := range iss.Items {
imagegraph.EnsureImageStreamNode(g, &iss.Items[i])
imagegraph.EnsureAllImageStreamTagNodes(g, &iss.Items[i])
}
for i := range bcs.Items {
build := buildgraph.EnsureBuildConfigNode(g, &bcs.Items[i])
buildedges.AddInputOutputEdges(g, build)
buildedges.JoinBuilds(build, builds.Items)
}
for i := range dcs.Items {
deploy := deploygraph.EnsureDeploymentConfigNode(g, &dcs.Items[i])
deployedges.AddTriggerEdges(g, deploy)
deployedges.JoinDeployments(deploy, rcs.Items)
}
for i := range svcs.Items {
service := kubegraph.EnsureServiceNode(g, &svcs.Items[i])
kubeedges.AddExposedPodTemplateSpecEdges(g, service)
}
imageedges.AddAllImageStreamRefEdges(g)
return g, nil
}
示例3: loadImageStreams
func loadImageStreams(g osgraph.Graph, graphLock sync.Mutex, namespace string, kclient kclient.Interface, client client.Interface) error {
iss, err := client.ImageStreams(namespace).List(labels.Everything(), fields.Everything())
if err != nil {
return err
}
graphLock.Lock()
defer graphLock.Unlock()
for i := range iss.Items {
imagegraph.EnsureImageStreamNode(g, &iss.Items[i])
imagegraph.EnsureAllImageStreamTagNodes(g, &iss.Items[i])
}
return nil
}