types

package
v1.10.0-alpha.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// HTTPS https protocol name
	HTTPS = "https"
	// HTTP http protocol name
	HTTP = "http"
	// Mysql mysql protocol name
	Mysql = "mysql"
	// Redis redis protocol name
	Redis = "redis"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AppliedResource

type AppliedResource struct {
	Cluster         string            `json:"cluster"`
	Component       string            `json:"component"`
	Trait           string            `json:"trait"`
	Kind            string            `json:"kind"`
	Namespace       string            `json:"namespace,omitempty"`
	Name            string            `json:"name,omitempty"`
	UID             types.UID         `json:"uid,omitempty"`
	APIVersion      string            `json:"apiVersion,omitempty"`
	ResourceVersion string            `json:"resourceVersion,omitempty"`
	DeployVersion   string            `json:"deployVersion,omitempty"`
	PublishVersion  string            `json:"publishVersion,omitempty"`
	Revision        string            `json:"revision,omitempty"`
	Latest          bool              `json:"latest"`
	ResourceTree    *ResourceTreeNode `json:"resourceTree,omitempty"`
}

AppliedResource resource metadata

func (*AppliedResource) GroupVersionKind

func (obj *AppliedResource) GroupVersionKind() schema.GroupVersionKind

GroupVersionKind returns the stored group, version, and kind from AppliedResource

type Endpoint

type Endpoint struct {
	// The protocol for this endpoint. Supports "TCP", "UDP", and "SCTP".
	// Default is TCP.
	// +default="TCP"
	// +optional
	Protocol corev1.Protocol `json:"protocol,omitempty"`

	// The protocol for this endpoint.
	// Un-prefixed names are reserved for IANA standard service names (as per
	// RFC-6335 and http://www.iana.org/assignments/service-names).
	// +optional
	AppProtocol *string `json:"appProtocol,omitempty"`

	// the host for the endpoint, it could be IP or domain
	Host string `json:"host"`

	// the port for the endpoint
	// Default is 80.
	Port int `json:"port"`

	// +optional
	// the name of the port
	PortName string `json:"portName,omitempty"`

	// the path for the endpoint
	Path string `json:"path,omitempty"`

	// Inner means the endpoint is only accessible within the cluster.
	Inner bool `json:"inner,omitempty"`
}

Endpoint create by ingress or service

type HealthStatus

type HealthStatus struct {
	Status  HealthStatusCode `json:"statusCode"`
	Reason  string           `json:"reason"`
	Message string           `json:"message"`
}

HealthStatus the resource health status

type HealthStatusCode

type HealthStatusCode string

HealthStatusCode Represents resource health status

const (
	// HealthStatusHealthy  resource is healthy
	HealthStatusHealthy HealthStatusCode = "Healthy"
	// HealthStatusUnHealthy resource is unhealthy
	HealthStatusUnHealthy HealthStatusCode = "UnHealthy"
	// HealthStatusProgressing resource is still progressing
	HealthStatusProgressing HealthStatusCode = "Progressing"
	// HealthStatusUnKnown health status is unknown
	HealthStatusUnKnown HealthStatusCode = "UnKnown"
)

type PodBase

type PodBase struct {
	Cluster   string   `json:"cluster"`
	Workload  Workload `json:"workload"`
	Component string   `json:"component"`
	Metadata  struct {
		CreationTime string `json:"creationTime"`
		Name         string `json:"name"`
		Namespace    string `json:"namespace"`
		Version      struct {
			PublishVersion string `json:"publishVersion"`
			DeployVersion  string `json:"deployVersion"`
		} `json:"version"`
		Labels map[string]string `json:"labels"`
	} `json:"metadata"`
	Status struct {
		HostIP   string `json:"hostIP"`
		NodeName string `json:"nodeName"`
		Phase    string `json:"phase"`
		PodIP    string `json:"podIP"`
	} `json:"status"`
}

PodBase the struct of pod list

type ResourceItem

type ResourceItem struct {
	Cluster        string                     `json:"cluster"`
	Workload       Workload                   `json:"workload"`
	Component      string                     `json:"component"`
	Object         *unstructured.Unstructured `json:"object"`
	PublishVersion string                     `json:"publishVersion"`
	DeployVersion  string                     `json:"deployVersion"`
}

ResourceItem the resource base info struct

type ResourceTreeNode

type ResourceTreeNode struct {
	Cluster           string                     `json:"cluster"`
	APIVersion        string                     `json:"apiVersion,omitempty"`
	Kind              string                     `json:"kind"`
	Namespace         string                     `json:"namespace,omitempty"`
	Name              string                     `json:"name,omitempty"`
	UID               types.UID                  `json:"uid,omitempty"`
	HealthStatus      HealthStatus               `json:"healthStatus,omitempty"`
	DeletionTimestamp time.Time                  `json:"deletionTimestamp,omitempty"`
	CreationTimestamp time.Time                  `json:"creationTimestamp,omitempty"`
	LeafNodes         []*ResourceTreeNode        `json:"leafNodes,omitempty"`
	AdditionalInfo    map[string]interface{}     `json:"additionalInfo,omitempty"`
	Object            *unstructured.Unstructured `json:"-"`
}

ResourceTreeNode is the tree node of every resource

func (*ResourceTreeNode) GroupVersionKind

func (rtn *ResourceTreeNode) GroupVersionKind() schema.GroupVersionKind

GroupVersionKind returns the stored group, version, and kind from ResourceTreeNode

type ServiceEndpoint

type ServiceEndpoint struct {
	Endpoint  Endpoint               `json:"endpoint"`
	Ref       corev1.ObjectReference `json:"ref"`
	Cluster   string                 `json:"cluster"`
	Component string                 `json:"component"`
}

ServiceEndpoint record the access endpoints of the application services

func (*ServiceEndpoint) String

func (s *ServiceEndpoint) String() string

String return endpoint URL

type Workload

type Workload struct {
	APIVersion string `json:"apiVersion"`
	Kind       string `json:"kind"`
	Name       string `json:"name"`
	Namespace  string `json:"namespace"`
}

Workload workload resource base info

Jump to

Keyboard shortcuts

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