model

package
v0.0.0-...-7784702 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CompletedColor = "#66ff33"
	RunningColor   = "#00ffff"
	FailedColor    = "#ff3300"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApplicationConfig

type ApplicationConfig struct {
	ContainerName  string
	ImageName      string
	Resources      k8sCoreV1.ResourceRequirements
	ResourcesUsage k8sCoreV1.ResourceList
}

func (ApplicationConfig) ImageStreamId

func (a ApplicationConfig) ImageStreamId() string

func (ApplicationConfig) IsImageStream

func (a ApplicationConfig) IsImageStream() bool

type ApplicationImage

type ApplicationImage interface {
	ImageFullName() string
	ImageName() string
	ImageVersion() string
}

type ApplicationProvider

type ApplicationProvider interface {
	ApplicationConfigs() []ApplicationConfig
}

type CronJob

type CronJob struct {
	Delegate k8sBatchV1.CronJob
}

func (CronJob) ApplicationConfigs

func (c CronJob) ApplicationConfigs() []ApplicationConfig

func (CronJob) Id

func (c CronJob) Id() string

func (CronJob) IsOwnerOf

func (c CronJob) IsOwnerOf(owner k8sMetaV1.OwnerReference) bool

func (CronJob) Kind

func (c CronJob) Kind() string

func (CronJob) Label

func (c CronJob) Label() string

func (CronJob) Name

func (c CronJob) Name() string

func (CronJob) OwnerReferences

func (c CronJob) OwnerReferences() []k8sMetaV1.OwnerReference

type DaemonSet

type DaemonSet struct {
	Delegate k8sAppsV1.DaemonSet
}

func (DaemonSet) ApplicationConfigs

func (d DaemonSet) ApplicationConfigs() []ApplicationConfig

func (DaemonSet) Id

func (d DaemonSet) Id() string

func (DaemonSet) IsOwnerOf

func (d DaemonSet) IsOwnerOf(owner k8sMetaV1.OwnerReference) bool

func (DaemonSet) Kind

func (d DaemonSet) Kind() string

func (DaemonSet) Label

func (d DaemonSet) Label() string

func (DaemonSet) Name

func (d DaemonSet) Name() string

func (DaemonSet) OwnerReferences

func (d DaemonSet) OwnerReferences() []k8sMetaV1.OwnerReference

type Deployment

type Deployment struct {
	Delegate k8sAppsV1.Deployment
}

func (Deployment) ApplicationConfigs

func (d Deployment) ApplicationConfigs() []ApplicationConfig

func (Deployment) Id

func (d Deployment) Id() string

func (Deployment) IsOwnerOf

func (d Deployment) IsOwnerOf(owner k8sMetaV1.OwnerReference) bool

func (Deployment) Kind

func (d Deployment) Kind() string

func (Deployment) Label

func (d Deployment) Label() string

func (Deployment) Name

func (d Deployment) Name() string

func (Deployment) OwnerReferences

func (d Deployment) OwnerReferences() []k8sMetaV1.OwnerReference

type DeploymentConfig

type DeploymentConfig struct {
	Delegate appsV1.DeploymentConfig
}

func (DeploymentConfig) ApplicationConfigs

func (d DeploymentConfig) ApplicationConfigs() []ApplicationConfig

func (DeploymentConfig) Id

func (d DeploymentConfig) Id() string

func (DeploymentConfig) IsOwnerOf

func (d DeploymentConfig) IsOwnerOf(owner k8sMetaV1.OwnerReference) bool

func (DeploymentConfig) Kind

func (d DeploymentConfig) Kind() string

func (DeploymentConfig) Label

func (d DeploymentConfig) Label() string

func (DeploymentConfig) Name

func (d DeploymentConfig) Name() string

func (DeploymentConfig) OwnerReferences

func (d DeploymentConfig) OwnerReferences() []k8sMetaV1.OwnerReference

type Image

type Image struct {
	FullName string
}

func NewImageByRegistry

func NewImageByRegistry(imageName string) *Image

func (*Image) ImageFullName

func (i *Image) ImageFullName() string

func (*Image) ImageName

func (i *Image) ImageName() string

func (*Image) ImageVersion

func (i *Image) ImageVersion() string

type ImageByStream

type ImageByStream struct {
	FullName string
	Delegate imageV1.Image
}

func NewImageByStream

func NewImageByStream(imageFullName string, delegate imageV1.Image) *ImageByStream

func (*ImageByStream) ImageFullName

func (i *ImageByStream) ImageFullName() string

func (*ImageByStream) ImageName

func (i *ImageByStream) ImageName() string

func (*ImageByStream) ImageVersion

func (i *ImageByStream) ImageVersion() string

type NamespaceModel

type NamespaceModel struct {
	// contains filtered or unexported fields
}

func (NamespaceModel) AddResource

func (namespace NamespaceModel) AddResource(resource Resource) bool

func (NamespaceModel) AllApplicationProviders

func (namespace NamespaceModel) AllApplicationProviders() []ApplicationProvider

func (NamespaceModel) AllPodsOf

func (namespace NamespaceModel) AllPodsOf(parent Resource) []Pod

func (NamespaceModel) AllResources

func (namespace NamespaceModel) AllResources() []Resource

func (NamespaceModel) LookupByKindAndId

func (namespace NamespaceModel) LookupByKindAndId(kind string, id string) Resource

func (NamespaceModel) LookupOwner

func (namespace NamespaceModel) LookupOwner(owner k8sMetaV1.OwnerReference) Resource

func (NamespaceModel) Name

func (namespace NamespaceModel) Name() string

func (NamespaceModel) ResourcesByKind

func (namespace NamespaceModel) ResourcesByKind(kind string) []Resource

type Pod

type Pod struct {
	Delegate   k8sCoreV1.Pod
	PodMetrics *k8sMetricsV1Beta1.PodMetrics
}

func (Pod) Id

func (p Pod) Id() string

func (Pod) IsOwnerOf

func (p Pod) IsOwnerOf(owner k8sMetaV1.OwnerReference) bool

func (Pod) IsRunning

func (p Pod) IsRunning() bool

func (Pod) Kind

func (d Pod) Kind() string

func (Pod) Label

func (p Pod) Label() string

func (Pod) Name

func (p Pod) Name() string

func (Pod) OwnerReferences

func (p Pod) OwnerReferences() []k8sMetaV1.OwnerReference

func (*Pod) SetMetrics

func (p *Pod) SetMetrics(podMetrics *k8sMetricsV1Beta1.PodMetrics)

func (Pod) UsageForContainer

func (p Pod) UsageForContainer(containerName string) k8sCoreV1.ResourceList

type Resource

type Resource interface {
	Kind() string
	Id() string
	Name() string
	Label() string

	OwnerReferences() []k8sMetaV1.OwnerReference
	IsOwnerOf(owner k8sMetaV1.OwnerReference) bool
}

type StatefulSet

type StatefulSet struct {
	Delegate k8sCoreV1.StatefulSet
}

func (StatefulSet) ApplicationConfigs

func (s StatefulSet) ApplicationConfigs() []ApplicationConfig

func (StatefulSet) Id

func (s StatefulSet) Id() string

func (StatefulSet) IsOwnerOf

func (s StatefulSet) IsOwnerOf(owner k8sMetaV1.OwnerReference) bool

func (StatefulSet) Kind

func (s StatefulSet) Kind() string

func (StatefulSet) Label

func (s StatefulSet) Label() string

func (StatefulSet) Name

func (s StatefulSet) Name() string

func (StatefulSet) OwnerReferences

func (s StatefulSet) OwnerReferences() []k8sMetaV1.OwnerReference

type TopologyModel

type TopologyModel struct {
	// contains filtered or unexported fields
}

func NewTopologyModel

func NewTopologyModel() *TopologyModel

func (TopologyModel) AddImage

func (topology TopologyModel) AddImage(imageName string, image ApplicationImage)

func (TopologyModel) AddNamespace

func (topology TopologyModel) AddNamespace(name string) *NamespaceModel

func (TopologyModel) AllNamespaces

func (topology TopologyModel) AllNamespaces() []NamespaceModel

func (TopologyModel) ImageByName

func (topology TopologyModel) ImageByName(imageName string) (ApplicationImage, bool)

func (TopologyModel) NamespaceByName

func (topology TopologyModel) NamespaceByName(name string) *NamespaceModel

Jump to

Keyboard shortcuts

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