urn

package
v0.0.0-...-c4caace Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

type Builder interface {
	URNPrefix() string
	BuildExternalID(kind, namespace, objName string) (string, error)
	BuildClusterExternalID() string
	BuildConfigMapExternalID(namespace, configMapName string) string
	BuildSecretExternalID(namespace, secretName string) string
	BuildNamespaceExternalID(namespaceName string) string
	BuildContainerExternalID(namespace, podName, containerName string) string
	BuildDaemonSetExternalID(namespace, daemonSetName string) string
	BuildDeploymentExternalID(namespace, deploymentName string) string
	BuildNodeExternalID(nodeName string) string
	BuildPodExternalID(namespace, podName string) string
	BuildReplicaSetExternalID(namespace, replicaSetName string) string
	BuildServiceExternalID(namespace, serviceName string) string
	BuildStatefulSetExternalID(namespace, statefulSetName string) string
	BuildCronJobExternalID(namespace, cronJobName string) string
	BuildJobExternalID(namespace, jobName string) string
	BuildIngressExternalID(namespace, ingressName string) string
	BuildVolumeExternalID(namespace, volumeName string) string
	BuildExternalVolumeExternalID(volumeType string, volumeComponents ...string) string
	BuildPersistentVolumeExternalID(persistentVolumeName string) string
	BuildPersistentVolumeClaimExternalID(namespace, persistentVolumeName string) string
	BuildComponentExternalID(component, namespace, name string) string
	BuildEndpointExternalID(endpointID string) string
	BuildNodeURNs(node v1.Node) []string
}

Builder builds StackState compatible URNs for Kubernetes components

func NewURNBuilder

func NewURNBuilder(clusterType ClusterType, url string) Builder

NewURNBuilder creates a new URNBuilder

type ClusterType

type ClusterType string

ClusterType represents the type of K8s Cluster

const (
	// Kubernetes is a Generic K8s cluster
	Kubernetes ClusterType = "kubernetes"
	// OpenShift is a RH OpenShift K8s cluster
	OpenShift ClusterType = "openshift"
)

func ClusterTypeFromString

func ClusterTypeFromString(s string) ClusterType

ClusterTypeFromString converts a string representation of the ClusterType to the specific ClusterType

Jump to

Keyboard shortcuts

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