nodes

package
v3.11.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 9, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ImageStreamNodeKind      = reflect.TypeOf(imagev1.ImageStream{}).Name()
	ImageNodeKind            = reflect.TypeOf(imagev1.Image{}).Name()
	ImageStreamTagNodeKind   = reflect.TypeOf(imagev1.ImageStreamTag{}).Name()
	ImageStreamImageNodeKind = reflect.TypeOf(imagev1.ImageStreamImage{}).Name()

	// non-api types
	DockerRepositoryNodeKind = reflect.TypeOf(imagev1.DockerImageReference{}).Name()
)

Functions

func EnsureDockerRepositoryNode

func EnsureDockerRepositoryNode(g osgraph.MutableUniqueGraph, name, tag string) graph.Node

EnsureDockerRepositoryNode adds the named Docker repository tag reference to the graph if it does not already exist. If the reference is invalid, the Name field of the graph will be used directly.

func EnsureImageComponentConfigNode

func EnsureImageComponentConfigNode(g osgraph.MutableUniqueGraph, name string) graph.Node

EnsureImageComponentConfigNode adds a graph node for the image config if it does not already exist.

func EnsureImageComponentLayerNode

func EnsureImageComponentLayerNode(g osgraph.MutableUniqueGraph, name string) graph.Node

EnsureImageComponentLayerNode adds a graph node for the image layer if it does not already exist.

func EnsureImageComponentManifestNode

func EnsureImageComponentManifestNode(g osgraph.MutableUniqueGraph, name string) graph.Node

EnsureImageComponentLayerNode adds a graph node for the image layer if it does not already exist.

func EnsureImageNode

func EnsureImageNode(g osgraph.MutableUniqueGraph, img *imagev1.Image) graph.Node

func EnsureImageStreamImageNode

func EnsureImageStreamImageNode(g osgraph.MutableUniqueGraph, namespace, name string) graph.Node

EnsureImageStreamImageNode adds a graph node for the specific ImageStreamImage if it does not already exist.

func EnsureImageStreamNode

func EnsureImageStreamNode(g osgraph.MutableUniqueGraph, is *imagev1.ImageStream) graph.Node

EnsureImageStreamNode adds a graph node for the Image Stream if it does not already exist.

func ImageComponentNodeName

func ImageComponentNodeName(name string) osgraph.UniqueName

func ImageNodeName

func ImageNodeName(o *imagev1.Image) osgraph.UniqueName

func ImageStreamImageNodeName

func ImageStreamImageNodeName(o *imagev1.ImageStreamImage) osgraph.UniqueName

func ImageStreamNodeName

func ImageStreamNodeName(o *imagev1.ImageStream) osgraph.UniqueName

func ImageStreamTagNodeName

func ImageStreamTagNodeName(o *imagev1.ImageStreamTag) osgraph.UniqueName

func MakeImageStreamImageObjectMeta

func MakeImageStreamImageObjectMeta(namespace, name string) *imagev1.ImageStreamImage

MakeImageStreamImageObjectMeta returns an ImageStreamImage that has enough information to join the graph, but it is not based on a full ISI object. This can be used to properly initialize the graph without having to retrieve all ISIs

func MakeImageStreamTagObjectMeta

func MakeImageStreamTagObjectMeta(namespace, name, tag string) *imagev1.ImageStreamTag

MakeImageStreamTagObjectMeta returns an ImageStreamTag that has enough information to join the graph, but it is not based on a full IST object. This can be used to properly initialize the graph without having to retrieve all ISTs

func MakeImageStreamTagObjectMeta2

func MakeImageStreamTagObjectMeta2(namespace, name string) *imagev1.ImageStreamTag

MakeImageStreamTagObjectMeta2 returns an ImageStreamTag that has enough information to join the graph, but it is not based on a full IST object. This can be used to properly initialize the graph without having to retrieve all ISTs

Types

type DockerImageRepositoryNode

type DockerImageRepositoryNode struct {
	osgraph.Node
	Ref imageapi.DockerImageReference
}

func (DockerImageRepositoryNode) ImageSpec

func (n DockerImageRepositoryNode) ImageSpec() string

func (DockerImageRepositoryNode) ImageTag

func (n DockerImageRepositoryNode) ImageTag() string

func (*DockerImageRepositoryNode) Kind

func (DockerImageRepositoryNode) String

func (n DockerImageRepositoryNode) String() string

func (DockerImageRepositoryNode) UniqueName

type ImageComponentNode

type ImageComponentNode struct {
	osgraph.Node
	Component string
	// An additional information describing the type of the component.
	Type ImageComponentType
}

ImageComponentNode represents either an image layer or image config. All the components are treated the same. A particular component (identified by a hash) can be of just one type.

func (*ImageComponentNode) Describe

func (n *ImageComponentNode) Describe() string

func (*ImageComponentNode) Kind

func (*ImageComponentNode) Kind() string

func (ImageComponentNode) Object

func (n ImageComponentNode) Object() interface{}

func (ImageComponentNode) String

func (n ImageComponentNode) String() string

type ImageComponentType

type ImageComponentType string
const (
	ImageComponentNodeKind = "ImageComponent"

	ImageComponentTypeConfig   ImageComponentType = `Config`
	ImageComponentTypeLayer    ImageComponentType = `Layer`
	ImageComponentTypeManifest ImageComponentType = `Manifest`
)

type ImageNode

type ImageNode struct {
	osgraph.Node
	Image *imagev1.Image
}

func FindImage

func FindImage(g osgraph.MutableUniqueGraph, imageName string) *ImageNode

func (*ImageNode) Kind

func (*ImageNode) Kind() string

func (ImageNode) Object

func (n ImageNode) Object() interface{}

func (ImageNode) String

func (n ImageNode) String() string

func (ImageNode) UniqueName

func (n ImageNode) UniqueName() osgraph.UniqueName

type ImageStreamImageNode

type ImageStreamImageNode struct {
	osgraph.Node
	*imagev1.ImageStreamImage

	IsFound bool
}

func FindOrCreateSyntheticImageStreamImageNode

func FindOrCreateSyntheticImageStreamImageNode(g osgraph.MutableUniqueGraph, isi *imagev1.ImageStreamImage) *ImageStreamImageNode

FindOrCreateSyntheticImageStreamImageNode returns the existing ISINode or creates a synthetic node in its place

func (ImageStreamImageNode) ImageSpec

func (n ImageStreamImageNode) ImageSpec() string

func (ImageStreamImageNode) ImageTag

func (n ImageStreamImageNode) ImageTag() string

func (*ImageStreamImageNode) Kind

func (*ImageStreamImageNode) Kind() string

func (ImageStreamImageNode) Object

func (n ImageStreamImageNode) Object() interface{}

func (ImageStreamImageNode) ResourceString

func (n ImageStreamImageNode) ResourceString() string

func (ImageStreamImageNode) String

func (n ImageStreamImageNode) String() string

func (ImageStreamImageNode) UniqueName

func (n ImageStreamImageNode) UniqueName() osgraph.UniqueName

type ImageStreamNode

type ImageStreamNode struct {
	osgraph.Node
	*imagev1.ImageStream

	IsFound bool
}

func FindOrCreateSyntheticImageStreamNode

func FindOrCreateSyntheticImageStreamNode(g osgraph.MutableUniqueGraph, is *imagev1.ImageStream) *ImageStreamNode

FindOrCreateSyntheticImageStreamNode returns the existing ISNode or creates a synthetic node in its place

func (ImageStreamNode) Found

func (n ImageStreamNode) Found() bool

func (*ImageStreamNode) Kind

func (*ImageStreamNode) Kind() string

func (ImageStreamNode) Object

func (n ImageStreamNode) Object() interface{}

func (ImageStreamNode) String

func (n ImageStreamNode) String() string

func (ImageStreamNode) UniqueName

func (n ImageStreamNode) UniqueName() osgraph.UniqueName

type ImageStreamTagNode

type ImageStreamTagNode struct {
	osgraph.Node
	*imagev1.ImageStreamTag

	IsFound bool
}

func EnsureAllImageStreamTagNodes

func EnsureAllImageStreamTagNodes(g osgraph.MutableUniqueGraph, is *imagev1.ImageStream) []*ImageStreamTagNode

EnsureAllImageStreamTagNodes creates all the ImageStreamTagNodes that are guaranteed to be present based on the ImageStream. This is different than inferring the presence of an object, since the IST is an object derived from a join between the ImageStream and the Image it references.

func EnsureImageStreamTagNode

func EnsureImageStreamTagNode(g osgraph.MutableUniqueGraph, ist *imagev1.ImageStreamTag) *ImageStreamTagNode

EnsureImageStreamTagNode adds a graph node for the specific tag in an Image Stream if it does not already exist.

func FindOrCreateSyntheticImageStreamTagNode

func FindOrCreateSyntheticImageStreamTagNode(g osgraph.MutableUniqueGraph, ist *imagev1.ImageStreamTag) *ImageStreamTagNode

FindOrCreateSyntheticImageStreamTagNode returns the existing ISTNode or creates a synthetic node in its place

func (ImageStreamTagNode) Found

func (n ImageStreamTagNode) Found() bool

func (ImageStreamTagNode) ImageSpec

func (n ImageStreamTagNode) ImageSpec() string

func (ImageStreamTagNode) ImageTag

func (n ImageStreamTagNode) ImageTag() string

func (*ImageStreamTagNode) Kind

func (*ImageStreamTagNode) Kind() string

func (ImageStreamTagNode) Object

func (n ImageStreamTagNode) Object() interface{}

func (ImageStreamTagNode) String

func (n ImageStreamTagNode) String() string

func (ImageStreamTagNode) UniqueName

func (n ImageStreamTagNode) UniqueName() osgraph.UniqueName

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL