graphview

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2016 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllDeploymentConfigPipelines

func AllDeploymentConfigPipelines(g osgraph.Graph, excludeNodeIDs IntSet) ([]DeploymentConfigPipeline, IntSet)

AllDeploymentConfigPipelines returns all the DCPipelines that aren't in the excludes set and the set of covered NodeIDs

func AllImagePipelinesFromBuildConfig

func AllImagePipelinesFromBuildConfig(g osgraph.Graph, excludeNodeIDs IntSet) ([]ImagePipeline, IntSet)

func AllPetSets added in v1.3.0

func AllPetSets(g osgraph.Graph, excludeNodeIDs IntSet) ([]PetSet, IntSet)

AllPetSets returns all the PetSets that aren't in the excludes set and the set of covered NodeIDs

func AllPods added in v1.1.5

func AllPods(g osgraph.Graph, excludeNodeIDs IntSet) ([]Pod, IntSet)

AllPods returns all Pods and the set of covered NodeIDs

func AllReplicationControllers added in v1.0.3

func AllReplicationControllers(g osgraph.Graph, excludeNodeIDs IntSet) ([]ReplicationController, IntSet)

AllReplicationControllers returns all the ReplicationControllers that aren't in the excludes set and the set of covered NodeIDs

func AllServiceGroups

func AllServiceGroups(g osgraph.Graph, excludeNodeIDs IntSet) ([]ServiceGroup, IntSet)

AllServiceGroups returns all the ServiceGroups that aren't in the excludes set and the set of covered NodeIDs

func CompareImagePipeline

func CompareImagePipeline(a, b *ImagePipeline) bool

func CompareObjectMeta

func CompareObjectMeta(a, b *kapi.ObjectMeta) bool

func MaxRecentContainerRestartsForRC added in v1.3.0

func MaxRecentContainerRestartsForRC(g osgraph.Graph, rcNode *kubegraph.ReplicationControllerNode) int32

MaxRecentContainerRestartsForRC returns the maximum container restarts in pods in the replication controller node for the last 10 minutes.

func NewDeploymentConfigPipeline

func NewDeploymentConfigPipeline(g osgraph.Graph, dcNode *deploygraph.DeploymentConfigNode) (DeploymentConfigPipeline, IntSet)

NewDeploymentConfigPipeline returns the DeploymentConfigPipeline and a set of all the NodeIDs covered by the DeploymentConfigPipeline

func NewImagePipelineFromBuildConfigNode

func NewImagePipelineFromBuildConfigNode(g osgraph.Graph, bcNode *buildgraph.BuildConfigNode) (ImagePipeline, IntSet)

NewImagePipeline attempts to locate a build flow from the provided node. If no such build flow can be located, false is returned.

func NewImagePipelineFromImageTagLocation

func NewImagePipelineFromImageTagLocation(g osgraph.Graph, node graph.Node, imageTagLocation ImageTagLocation) (ImagePipeline, IntSet)

NewImagePipelineFromImageTagLocation returns the ImagePipeline and all the nodes contributing to it

func NewPetSet added in v1.3.0

func NewPetSet(g osgraph.Graph, node *kubegraph.PetSetNode) (PetSet, IntSet)

NewPetSet returns the PetSet and a set of all the NodeIDs covered by the PetSet

func NewPod added in v1.1.5

func NewPod(g osgraph.Graph, podNode *kubegraph.PodNode) (Pod, IntSet)

NewPod returns the Pod and a set of all the NodeIDs covered by the Pod

func NewReplicationController added in v1.0.3

func NewReplicationController(g osgraph.Graph, rcNode *kubegraph.ReplicationControllerNode) (ReplicationController, IntSet)

NewReplicationController returns the ReplicationController and a set of all the NodeIDs covered by the ReplicationController

func NewServiceGroup

func NewServiceGroup(g osgraph.Graph, serviceNode *kubegraph.ServiceNode) (ServiceGroup, IntSet)

NewServiceGroup returns the ServiceGroup and a set of all the NodeIDs covered by the service

Types

type DeploymentConfigPipeline

type DeploymentConfigPipeline struct {
	Deployment *deploygraph.DeploymentConfigNode

	ActiveDeployment    *kubegraph.ReplicationControllerNode
	InactiveDeployments []*kubegraph.ReplicationControllerNode

	Images []ImagePipeline
}

type ImagePipeline

type ImagePipeline struct {
	Image               ImageTagLocation
	DestinationResolved bool
	ScheduledImport     bool

	Build *buildgraph.BuildConfigNode

	LastSuccessfulBuild   *buildgraph.BuildNode
	LastUnsuccessfulBuild *buildgraph.BuildNode
	ActiveBuilds          []*buildgraph.BuildNode

	// If set, the base image used by the build
	BaseImage ImageTagLocation
	// if set, the build config names that produces the base image
	BaseBuilds []string
	// If set, the source repository that inputs to the build
	Source SourceLocation
}

ImagePipeline represents a build, its output, and any inputs. The input to a build may be another ImagePipeline.

type ImageTagLocation

type ImageTagLocation interface {
	ID() int
	ImageSpec() string
	ImageTag() string
}

ImageTagLocation identifies the source or destination of an image. Represents both a tag in a Docker image repository, as well as a tag in an OpenShift image stream.

type IntSet

type IntSet map[int]sets.Empty

func NewIntSet

func NewIntSet(items ...int) IntSet

NewIntSet creates a IntSet from a list of values.

func (IntSet) Delete

func (s IntSet) Delete(items ...int)

Delete removes all items from the set.

func (IntSet) Has

func (s IntSet) Has(item int) bool

Has returns true iff item is contained in the set.

func (IntSet) Insert

func (s IntSet) Insert(items ...int)

Insert adds items to the set.

func (IntSet) List

func (s IntSet) List() []int

List returns the contents as a sorted string slice.

type PetSet added in v1.3.0

type PetSet struct {
	PetSet *kubegraph.PetSetNode

	OwnedPods   []*kubegraph.PodNode
	CreatedPods []*kubegraph.PodNode
}

type Pod added in v1.1.5

type Pod struct {
	Pod *kubegraph.PodNode
}

type ReplicationController added in v1.0.3

type ReplicationController struct {
	RC *kubegraph.ReplicationControllerNode

	OwnedPods   []*kubegraph.PodNode
	CreatedPods []*kubegraph.PodNode

	ConflictingRCs        []*kubegraph.ReplicationControllerNode
	ConflictingRCIDToPods map[int][]*kubegraph.PodNode
}

func (*ReplicationController) MaxRecentContainerRestarts added in v1.3.0

func (rc *ReplicationController) MaxRecentContainerRestarts() int32

MaxRecentContainerRestarts returns the maximum container restarts for all pods in replication controller.

type ServiceGroup

type ServiceGroup struct {
	Service *kubegraph.ServiceNode

	DeploymentConfigPipelines []DeploymentConfigPipeline
	ReplicationControllers    []ReplicationController
	PetSets                   []PetSet

	// TODO: this has to stop
	FulfillingPetSets []*kubegraph.PetSetNode
	FulfillingDCs     []*deploygraph.DeploymentConfigNode
	FulfillingRCs     []*kubegraph.ReplicationControllerNode
	FulfillingPods    []*kubegraph.PodNode

	ExposingRoutes []*routegraph.RouteNode
}

ServiceGroup is a service, the DeploymentConfigPipelines it covers, and lists of the other nodes that fulfill it

type ServiceGroupByObjectMeta added in v1.0.8

type ServiceGroupByObjectMeta []ServiceGroup

func (ServiceGroupByObjectMeta) Len added in v1.0.8

func (m ServiceGroupByObjectMeta) Len() int

func (ServiceGroupByObjectMeta) Less added in v1.0.8

func (m ServiceGroupByObjectMeta) Less(i, j int) bool

func (ServiceGroupByObjectMeta) Swap added in v1.0.8

func (m ServiceGroupByObjectMeta) Swap(i, j int)

type SortedDeploymentConfigPipeline

type SortedDeploymentConfigPipeline []DeploymentConfigPipeline

func (SortedDeploymentConfigPipeline) Len

func (SortedDeploymentConfigPipeline) Less

func (SortedDeploymentConfigPipeline) Swap

func (m SortedDeploymentConfigPipeline) Swap(i, j int)

type SortedImagePipelines

type SortedImagePipelines []ImagePipeline

func (SortedImagePipelines) Len

func (m SortedImagePipelines) Len() int

func (SortedImagePipelines) Less

func (m SortedImagePipelines) Less(i, j int) bool

func (SortedImagePipelines) Swap

func (m SortedImagePipelines) Swap(i, j int)

type SourceLocation

type SourceLocation interface {
	ID() int
}

SourceLocation identifies a repository that is an input to a build.

Jump to

Keyboard shortcuts

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