model

package
v0.0.0-...-9f7285a Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ref: https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/tasks.html#task-instances
	TASKINSTANCE_NONE              string = "none"
	TASKINSTANCE_SCHEDULED         string = "scheduled"
	TASKINSTANCE_QUEUED            string = "queued"
	TASKINSTANCE_RUNNING           string = "running"
	TASKINSTANCE_SUCCESS           string = "success"
	TASKINSTANCE_SHUTDOWN          string = "shutdown"
	TASKINSTANCE_RESTARTING        string = "restarting"
	TASKINSTANCE_FAILED            string = "failed"
	TASKINSTANCE_SKIPPED           string = "skipped"
	TASKINSTANCE_UP_FOR_RETRY      string = "up_for_retry"
	TASKINSTANCE_DEFERRED          string = "deferred"
	TASKINSTANCE_UP_FOR_RESCHEDULE string = "up_for_reschedule"
	TASKINSTANCE_REMOVED           string = "removed"
	TASKINSTANCE_UPSTREAM_FAILED   string = "upstream_failed"

	// Original States //
	// Zombie status for KHI view
	TASKINSTANCE_ZOMBIE string = "zombie"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AirflowTaskInstance

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

ref: https://github.com/apache/airflow/blob/main/airflow/models/taskinstance.py#L1187

func NewAirflowTaskInstance

func NewAirflowTaskInstance(dagId string, taskId string, runId string, mapIndex string, host string, status string) *AirflowTaskInstance

func (*AirflowTaskInstance) DagId

func (a *AirflowTaskInstance) DagId() string

func (*AirflowTaskInstance) Host

func (a *AirflowTaskInstance) Host() string

func (*AirflowTaskInstance) MapIndex

func (a *AirflowTaskInstance) MapIndex() string

func (*AirflowTaskInstance) RunId

func (a *AirflowTaskInstance) RunId() string

func (*AirflowTaskInstance) Status

func (a *AirflowTaskInstance) Status() string

func (*AirflowTaskInstance) TaskId

func (a *AirflowTaskInstance) TaskId() string

func (*AirflowTaskInstance) ToYaml

func (a *AirflowTaskInstance) ToYaml() string

type AirflowWorker

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

func NewAirflowWorker

func NewAirflowWorker(host string) *AirflowWorker

func (*AirflowWorker) Host

func (a *AirflowWorker) Host() string

func (*AirflowWorker) ToYaml

func (a *AirflowWorker) ToYaml() string

type DagFileProcessorStats

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

func NewDagFileProcessorStats

func NewDagFileProcessorStats(dagFilePath string, runtime string, numberOfDags string, numberOfErrors string) *DagFileProcessorStats

func (*DagFileProcessorStats) DagFilePath

func (s *DagFileProcessorStats) DagFilePath() string

func (*DagFileProcessorStats) NumberOfDags

func (s *DagFileProcessorStats) NumberOfDags() string

func (*DagFileProcessorStats) NumberOfErrors

func (s *DagFileProcessorStats) NumberOfErrors() string

func (*DagFileProcessorStats) Runtime

func (s *DagFileProcessorStats) Runtime() string

func (*DagFileProcessorStats) ToYaml

func (s *DagFileProcessorStats) ToYaml() string

type EndpointSlice

type EndpointSlice struct {
	Endpoints []*EndpointSliceEndpoint `yaml:"endpoints"`
	Metadata  *K8sObjectMeta           `yaml:"metadata"`
}

type EndpointSliceEndpoint

type EndpointSliceEndpoint struct {
	Addresses  []string                         `yaml:"addresses"`
	Conditions *EndpointSliceEndpointConditions `yaml:"conditions"`
	TargetRef  *K8sTargetRef                    `yaml:"targetRef"`
	NodeName   string                           `yaml:"nodeName"`
	HostName   string                           `yaml:"hostName"` // This field maybe always empty in GKE
}

type EndpointSliceEndpointConditions

type EndpointSliceEndpointConditions struct {
	Ready       bool `yaml:"ready"`
	Serving     bool `yaml:"serving"`
	Terminating bool `yaml:"terminating"`
}

func (*EndpointSliceEndpointConditions) SameWith

type K8sDeleteRequest

type K8sDeleteRequest struct {
	Preconditions *K8sDeleteRequestPreconditions `yaml:"preconditions"`
}

type K8sDeleteRequestPreconditions

type K8sDeleteRequestPreconditions struct {
	Uid string `yaml:"uid"`
}

type K8sObjectMeta

type K8sObjectMeta struct {
	Name            string            `yaml:"name"`
	Namespace       string            `yaml:"namespace"`
	GenerateName    string            `yaml:"generateName"`
	UID             string            `yaml:"uid"`
	ResourceVersion string            `yaml:"resourceVersion"`
	Labels          map[string]string `yaml:"labels"`
	Annotations     map[string]string `yaml:"annotations"`
	OwnerReferences []OwnerReference  `yaml:"ownerReferences"`
	Finalizers      []string          `yaml:"finalizers"`
}

type K8sResourceContainingStatus

type K8sResourceContainingStatus struct {
	Status *K8sResourceStatus `yaml:"status"`
}

A kubernetes resource `.status` field

type K8sResourceList

type K8sResourceList struct {
	Items []*K8sResourceWithMetadata `yaml:"items"`
}

type K8sResourceStatus

type K8sResourceStatus struct {
	Conditions []*K8sResourceStatusCondition `yaml:"conditions"`
}

type K8sResourceStatusCondition

type K8sResourceStatusCondition struct {
	Type               string `yaml:"type"`
	LastTransitionTime string `yaml:"lastTransitionTime"`
	LastHeartbeatTime  string `yaml:"lastHeartbeatTime"`
	LastProbeTime      string `yaml:"lastProbeTime"`
	Message            string `yaml:"message"`
	Status             string `yaml:"status"`
	Reason             string `yaml:"reason"`
}

type K8sResourceWithMetadata

type K8sResourceWithMetadata struct {
	Metadata *K8sObjectMeta `yaml:"metadata"`
}

type K8sTargetRef

type K8sTargetRef struct {
	Kind      string `yaml:"kind"`
	Name      string `yaml:"name"`
	Namespace string `yaml:"namespace"`
	Uid       string `yaml:"uid"`
}

type KubernetesObjectOperation

type KubernetesObjectOperation struct {
	APIVersion      string
	PluralKind      string
	Namespace       string
	Name            string
	SubResourceName string
	Verb            enum.RevisionVerb
}

func (*KubernetesObjectOperation) CovertToResourcePath

func (o *KubernetesObjectOperation) CovertToResourcePath() string

func (*KubernetesObjectOperation) GetSingularKindName

func (o *KubernetesObjectOperation) GetSingularKindName() string

type OwnerReference

type OwnerReference struct {
	APIVersion string `yaml:"apiVersion"`
	Kind       string `yaml:"kind"`
	Name       string `yaml:"name"`
	UID        string `yaml:"uid"`
}

type Pod

type Pod struct {
	Metadata *PodMetadata `yaml:"metadata"`
	Status   *PodStatus   `yaml:"status"`
}

type PodIP

type PodIP struct {
	IP string `yaml:"ip"`
}

type PodMetadata

type PodMetadata struct {
	Uid string `yaml:"uid"`
}

type PodStatus

type PodStatus struct {
	HostIP string   `yaml:"hostIP"`
	PodIP  string   `yaml:"podIP"`
	PodIPs []*PodIP `yaml:"podIPs"`
}

Jump to

Keyboard shortcuts

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