Documentation ¶
Index ¶
- type Action
- type Agent
- type Annotations
- type Audit
- type Data
- type DataModelInterface
- type DeliveryInfo
- type Event
- type File
- type JSONData
- type LifePhase
- type Lifecycle
- type Log
- type NodeInfo
- type NodeLifePhase
- type NodeParams
- type NodeYaml
- type P1
- type P2
- type P3
- type P4
- type P5
- type P6
- type P7
- type PodCreateOrDeleteOrUpgrade
- type PodInfo
- type PodParams
- type PodYaml
- type Processes
- type References
- type Resource
- type Response
- type SloOptions
- type SloTraceData
- type Slodata
- type Span
- type Spans
- type Tags
- type TraceDetailMetaData
- type TraceInfo
- type TraceListMetaData
- type TraceStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Annotations ¶
type Audit ¶
type Audit struct { AuditId string `json:"auditid" gorm:"audit_id"` // 主键 SqlStageTimestamp time.Time `gorm:"stage_timestamp"` // stage_timestamp Cluster string `gorm:"cluster"` // cluster Namespace string `gorm:"namespace"` // namespace Resource string `gorm:"resource"` // resource Content string `gorm:"content"` // content AuditLog k8saudit.Event `gorm:"-"` }
func (*Audit) EsTableName ¶
type DataModelInterface ¶
type DeliveryInfo ¶
type Event ¶
type Event struct { Agent Agent `json:"agent"` Log Log `json:"log"` Annotations Annotations `json:"annotations"` ResponseObject interface{} `json:"responseObject"` }
type LifePhase ¶
type LifePhase struct { // stage 代表 Pod 的 trace 链路中的一个大类 // OperationName 和 Reason 可以用来决定 stage DocID string `json:"omitempty" gorm:"column:doc_id"` PlfID string `json:"plf_id"` TraceStage string `json:"traceStage"` DataSourceId string `json:"dataSourceId" gorm:"column:data_source_id"` ClusterName string `json:"clusterName" gorm:"column:cluster_name"` Namespace string `json:"namespace" gorm:"column:namespace"` PodName string `json:"podName" gorm:"column:pod_name"` PodUID string `json:"podUID" gorm:"column:pod_uid"` OperationName string `json:"operationName" gorm:"column:operation_name"` HasErr bool `json:"hasErr" gorm:"column:has_err"` SqlHasErr string `gorm:"column:has_err"` StartTime time.Time `json:"startTime" gorm:"column:start_time"` EndTime time.Time `gorm:"column:end_time"` ExtraInfo interface{} `json:"extraInfo,omitempty" gorm:"-"` Reason interface{} `json:"reason,omitempty" gorm:"-"` Message interface{} `json:"message,omitempty" gorm:"-"` Info string `gorm:"column:extra_info"` }
func (*LifePhase) EsTableName ¶
当前 es 和 ob 版本的表名还不一致, 过度阶段增加一个EsTableName()返回 Es的表名 后续表名统一后, 删除 EsTableName() 仅使用 TableName()
type Lifecycle ¶
type Lifecycle struct { FinishedTime string `json:"finishedTime,omitempty"` RunningAt string `json:"runningAt,omitempty"` SucceedAt string `json:"succeedAt,omitempty"` FailedAt string `json:"failedAt,omitempty"` ReadyAt string `json:"readyAt,omitempty"` LastActiveAt string `json:"lastActiveAt,omitempty"` CreatedAt string `json:"createdAt,omitempty"` ScheduledAt string `json:"scheduledAt,omitempty"` DeleteEndAt string `json:"deleteEndAt,omitempty"` DeletedAt string `json:"deletedAt,omitempty"` UpgradeAt string `json:"upgradeAt,omitempty"` UpgradeFinshedAt string `json:"upgradeFinshedAt,omitempty"` }
type NodeLifePhase ¶
type NodeLifePhase struct { DocID string `gorm:"column:doc_id"` PlfID string TraceStage string `json:"traceStage"` DataSourceId string `json:"dataSourceId" gorm:"column:data_source_id"` ClusterName string `json:"clusterName" gorm:"column:cluster_name"` NodeName string `json:"nodeName" gorm:"column:node_name"` UID string `json:"uid" gorm:"column:node_uid"` OperationName string `json:"operationName" gorm:"column:operation_name"` HasErr bool `json:"hasErr" gorm:"column:has_err"` StartTime time.Time `json:"startTime" gorm:"column:start_time"` EndTime time.Time `gorm:"column:end_time"` ExtraInfo interface{} `json:"extraInfo,omitempty" gorm:"-"` Reason interface{} `json:"reason,omitempty" gorm:"-"` Message interface{} `json:"message,omitempty" gorm:"-"` SqlExtraInfo string `gorm:"column:extra_info"` }
func (*NodeLifePhase) EsTableName ¶
func (s *NodeLifePhase) EsTableName() string
func (*NodeLifePhase) TableName ¶
func (s *NodeLifePhase) TableName() string
func (*NodeLifePhase) TypeName ¶
func (s *NodeLifePhase) TypeName() string
type NodeParams ¶
type NodeYaml ¶
type NodeYaml struct { AuditID string `gorm:"column:audit_id"` SqlNode string `gorm:"column:node"` NodeName string `gorm:"column:node_name"` NodeIp string `gorm:"column:node_ip"` UID string `gorm:"column:uid"` ClusterName string `gorm:"column:cluster_name"` Node *corev1.Node `gorm:"-"` StageTimeStamp time.Time `gorm:"column:stage_timestamp"` }
func (*NodeYaml) EsTableName ¶
当前 es 和 ob 版本的表名还不一致, 过度阶段增加一个EsTableName()返回 Es的表名 后续表名统一后, 删除 EsTableName() 仅使用 TableName()
type P1 ¶
type P1 struct { ServiceName string `json:"serviceName"` Tags []interface{} `json:"tags"` }
type P2 ¶
type P2 struct { ServiceName string `json:"serviceName"` Tags []interface{} `json:"tags"` }
type P3 ¶
type P3 struct { ServiceName string `json:"serviceName"` Tags []interface{} `json:"tags"` }
type P4 ¶
type P4 struct { ServiceName string `json:"serviceName"` Tags []interface{} `json:"tags"` }
type P5 ¶
type P5 struct { ServiceName string `json:"serviceName"` Tags []interface{} `json:"tags"` }
type P6 ¶
type P6 struct { ServiceName string `json:"serviceName"` Tags []interface{} `json:"tags"` }
type P7 ¶
type P7 struct { ServiceName string `json:"serviceName"` Tags []interface{} `json:"tags"` }
type PodInfo ¶
type PodInfo struct { DocID string `json:"docid,omitempty" gorm:"column:doc_id"` ClusterName string `json:"ClusterName,omitempty" gorm:"column:cluster_name"` Namespace string `json:"Namespace,omitempty" gorm:"column:namespace"` PodName string `json:"PodName,omitempty" gorm:"column:pod_name"` PodUID string `json:"PodUID,omitempty" gorm:"column:pod_uid"` PodIP string `json:"PodIP,omitempty" gorm:"column:pod_ip"` NodeName string `json:"NodeName,omitempty" gorm:"-"` AppName string `json:"AppName,omitempty" gorm:"-"` NodeIP string `json:"NodeIP,omitempty" gorm:"-"` Zone string `json:"Zone,omitempty" gorm:"column:zone"` PodPhase string `json:"PodPhase,omitempty" gorm:"-"` LastTimeStamp string `json:"LastActiveAt,omitempty" gorm:"-"` CreateTime string `json:"CreatedAt,omitempty" gorm:"-"` State string `json:"State,omitempty" gorm:"-"` Resource string `json:"Resource,omitempty" gorm:"-"` SLO string `json:"SLO,omitempty" gorm:"-"` Quota string `json:"Quota,omitempty" gorm:"-"` IpPool string `json:"IPPool,omitempty" gorm:"-"` DeliveryStatus string `gorm:"column:deliver_status" json:"deliverStatus,omitempty"` StartTime time.Time `gorm:"column:start_time"` CurrentTime time.Time `gorm:"column:slo_current_time"` DeliveryProgress string `gorm:"column:delivery_progress" json:"deliveryprogress,omitempty"` StageTimestamp time.Time `gorm:"column:stage_timestamp"` AuditID string `gorm:"column:audit_id" json:"auditid,omitempty"` // 为了 SLO 前端 BizSource string `json:"BizSource,omitempty" gorm:"column:biz_source"` BizId string `json:"BizId,omitempty" gorm:"column:biz_id"` WorkOrderId string `json:"WorkOrderId,omitempty" gorm:"column:work_order_id"` BizSize string `json:"BizSize,omitempty" gorm:"-"` }
func (*PodInfo) EsTableName ¶
type PodYaml ¶
type PodYaml struct { AuditID string `json:"auditID,omitempty" gorm:"column:audit_id"` ClusterName string `json:"clusterName,omitempty" gorm:"column:cluster_name"` Namespace string `json:"namespace,omitempty" gorm:"column:namespace"` SLO string `json:"slo,omitempty" gorm:"-"` Status string `json:"Status,omitempty" gorm:"-"` HostIP string `json:"hostIP,omitempty" gorm:"column:host_ip"` PodIP string `json:"podIP,omitempty" gorm:"column:pod_ip"` Hostname string `json:"hostname,omitempty" gorm:"column:hostname"` IsDeleted string `json:"isDeleted,omitempty" gorm:"column:is_deleted"` Pod *v1.Pod `json:"pod,omitempty" gorm:"-"` SqlPod string `json:"sqlpod,omitempty" gorm:"column:pod"` PodName string `json:"podName,omitempty" gorm:"column:pod_name"` PodUid string `json:"podUid,omitempty" gorm:"column:pod_uid"` CreationTimestamp time.Time `json:"creationTimestamp,omitempty" gorm:"column:stage_timestamp"` StageTimestamp time.Time `json:"stageTimestamp,omitempty" gorm:"-"` SLOResult string `json:"sloResult,omitempty" gorm:"-"` SLOType string `json:"sloType,omitempty" gorm:"-"` IsBeginDelete string `json:"isBeginDelete,omitempty" gorm:"-"` Fqdn string `json:"fqdn,omitempty" gorm:"column:fqdn"` DebugUrl string `json:"DebugUrl,omitempty" gorm:"-"` SqlImages string `json:"sqlimages,omitempty" gorm:"column:images"` }
对外数据模型
func (*PodYaml) EsTableName ¶
当前 es 和 ob 版本的表名还不一致, 过度阶段增加一个EsTableName()返回 Es的表名 后续表名统一后, 删除 EsTableName() 仅使用 TableName()
type References ¶
type Response ¶
type Response struct { Code int `json:"code" ` Status string `json:"status"` Message string `json:"message"` Data interface{} `json:"data"` }
对外数据模型
type SloOptions ¶
type SloTraceData ¶
type SloTraceData struct { DocID string `gorm:"column:doc_id" json:"omitempty"` Cluster string `gorm:"column:cluster"` InitImage string `gorm:"column:init_image"` Namespace string `gorm:"column:namespace"` PodName string `gorm:"column:pod_name"` PodUID string `gorm:"column:pod_uid"` Type string `gorm:"column:type"` NodeIP string `gorm:"column:node_ip"` NodeName string `gorm:"column:node_name"` DebugUrl string `gorm:"column:debug_url"` AppName string `gorm:"column:app_name"` OwnerRefStr string `gorm:"column:owner_ref_str"` BizName string `gorm:"column:biz_name"` BizId string `gorm:"column:biz_id"` DeliveryWorkload string `gorm:"column:delivery_workload"` WorkOrderId string `gorm:"column:work_order_id"` SchedulingStrategy string `gorm:"column:scheduling_strategy"` StartUpResultFromCreate string `gorm:"column:start_up_result_from_create"` StartUpResultFromSchedule string `gorm:"column:start_up_result_from_schedule"` Situation string `gorm:"column:situation"` ResourceType string `gorm:"column:resource_type"` IsJob bool `gorm:"column:is_job"` IsRafs bool `gorm:"column:is_rafs"` Cores int64 `gorm:"column:cores"` WrittenToZsearch bool `gorm:"column:written_to_zsearch"` Finished bool `gorm:"column:finished"` StopInterEvents bool `gorm:"column:stop_inter_events"` Created time.Time `gorm:"column:created"` CreatedTime time.Time `gorm:"column:created_time"` FinishTime time.Time `gorm:"column:finish_time"` ActualFinishTimeAfterSchedule time.Time `gorm:"column:actual_finish_time_after_schedule"` ActualFinishTimeAfterCreate time.Time `gorm:"column:actual_finish_time_after_create"` Scheduled time.Time `gorm:"column:scheduled"` PodInitializedTime time.Time `gorm:"column:pod_initialized_time"` ContainersReady time.Time `gorm:"column:container_ready"` RunningAt time.Time `gorm:"column:running_at"` SucceedAt time.Time `gorm:"column:succeed_at"` FailedAt time.Time `gorm:"column:failed_at"` ReadyAt time.Time `gorm:"column:ready_at"` DeletedTime time.Time `gorm:"column:deleted_time"` InitStartTime time.Time `gorm:"column:init_start_time"` ImageNameToPullTime map[string]float64 `gorm:"-"` PossibleReason *string `gorm:"-"` PossibleReasonStr string `gorm:"column:possible_reason"` SLOViolationReason string `gorm:"column:slo_violation_reason"` PodSLO int64 `gorm:"column:pod_slo"` DeliverySLO int64 `gorm:"column:delivery_slo"` DeliverySLOAdjusted bool `gorm:"column:delivery_slo_adjusted"` DeliveryDuration time.Duration `gorm:"column:delivery_duration"` DeliveryStatus string `gorm:"column:delivery_status"` DeliveryStatusOrig string `gorm:"column:delivery_status_orig"` SloHint string `gorm:"column:slo_hint"` TrigerAuditLog string `gorm:"column:triger_audit_log"` DeleteResult string `gorm:"column:delete_result"` KubeletKillingHost string `gorm:"column:kubelet_killing_host"` DeleteEndTime time.Time `gorm:"column:delete_end_time"` RMZappInfoTime time.Time `gorm:"column:rm_zappinfo_time"` RMFQDNTime time.Time `gorm:"column:rm_fqdn_time"` RMCMDBTime time.Time `gorm:"column:rm_cmdb_time"` RMCNIAllocatedTime time.Time `gorm:"column:rm_cni_allocated_time"` RMAliCloudCNITime time.Time `gorm:"column:rm_ali_cloud_cni_time"` KubeletKillingTime time.Time `gorm:"column:kubelet_killing_time"` RemainingFinalizer []string `gorm:"column:remaining_finalizers;serializer:json"` DeleteTimeoutTime time.Time `gorm:"column:delete_timeout_time"` UpgradeResult string `gorm:"column:upgrade_result"` UpgradeContainerName string `gorm:"column:upgrade_container_name"` UpdateStatus string `gorm:"column:update_status"` UpgradeEndTime time.Time `gorm:"column:upgrade_end_time"` UpgradeTimeoutTime time.Time `gorm:"column:upgrade_timeout_time"` PVCName string `gorm:"column:pvc_name"` PVCUID string `gorm:"column:pvc_uid"` CreateResult string `gorm:"column:create_result"` TimeoutTime time.Time `gorm:"column:timeout_time"` PullTimeoutImageName string `gorm:"-"` SLOResult []string `json:"sloResult,omitempty" gorm:"-"` SLOType string `json:"sloType,omitempty" gorm:"-"` }
func (*SloTraceData) EsTableName ¶
func (s *SloTraceData) EsTableName() string
func (*SloTraceData) TableName ¶
func (s *SloTraceData) TableName() string
func (*SloTraceData) TypeName ¶
func (s *SloTraceData) TypeName() string
type Slodata ¶
type Slodata struct { DocID string `gorm:"column:doc_id" json:"omitempty"` Cluster string `gorm:"column:cluster" json:"cluster,omitempty"` InitImage string `gorm:"column:init_image" json:"initimage,omitempty"` Namespace string `gorm:"column:namespace" json:"namespace,omitempty"` PodName string `gorm:"column:pod_name" json:"podName,omitempty"` PodUID string `gorm:"column:pod_uid" json:"podUid,omitempty"` Type string `gorm:"column:type" json:"type,omitempty"` NodeIP string `gorm:"column:node_ip" json:"nodeIp,omitempty"` NodeName string `gorm:"column:node_name" json:"nodeName,omitempty"` DebugUrl string `gorm:"column:debug_url" json:"debugUrl,omitempty"` AppName string `gorm:"column:app_name" json:"appname,omitempty"` OwnerRefStr string `gorm:"column:owner_ref_str" json:"ownerRef,omitempty"` BizName string `gorm:"column:biz_name" json:"bizName,omitempty"` BizId string `gorm:"column:biz_id" json:"bizId,omitempty"` DeliveryWorkload string `gorm:"column:delivery_workload" json:"deliveryWorkload,omitempty"` WorkOrderId string `gorm:"column:work_order_id" json:"workorderid,omitempty"` SchedulingStrategy string `gorm:"column:scheduling_strategy" json:"scheduleStrategy,omitempty"` StartUpResultFromCreate string `gorm:"column:start_up_result_from_create" json:"startupresultfromcreate,omitempty"` StartUpResultFromSchedule string `gorm:"column:start_up_result_from_schedule" json:"startupresultfromschedule,omitempty"` Situation string `gorm:"column:situation" json:"situation,omitempty"` ResourceType string `gorm:"column:resource_type" json:"resourceType,omitempty"` IsJob bool `gorm:"column:is_job" json:"isjob,omitempty"` IsRafs bool `gorm:"column:is_rafs" json:"israfs,omitempty"` Cores int64 `gorm:"column:cores" json:"cores,omitempty"` WrittenToZsearch bool `gorm:"column:written_to_zsearch" json:"writtentozsearch,omitempty"` Finished bool `gorm:"column:finished" json:"finished,omitempty"` StopInterEvents bool `gorm:"column:stop_inter_events" json:"stopinterevents,omitempty"` Created time.Time `gorm:"column:created" json:"CreatedTime,omitempty"` CreatedTime time.Time `gorm:"column:created_time" json:"createdtime,omitempty"` FinishTime time.Time `gorm:"column:finish_time" json:"finishTime,omitempty"` ActualFinishTimeAfterSchedule time.Time `gorm:"column:actual_finish_time_after_schedule" json:"actualfinishtimeafterschedule,omitempty"` ActualFinishTimeAfterCreate time.Time `gorm:"column:actual_finish_time_after_create" json:"actualfinishtimeaftercreate,omitempty"` Scheduled time.Time `gorm:"column:scheduled" json:"scheduled,omitempty"` PodInitializedTime time.Time `gorm:"column:pod_initialized_time" json:"podinitializedtime,omitempty"` ContainersReady time.Time `gorm:"column:container_ready" json:"ContainersReadyTime,omitempty"` RunningAt time.Time `gorm:"column:running_at" json:"runningAt,omitempty"` SucceedAt time.Time `gorm:"column:succeed_at" json:"succeedAt,omitempty"` FailedAt time.Time `gorm:"column:failed_at" json:"failedAt,omitempty"` ReadyAt time.Time `gorm:"column:ready_at" json:"readyAt,omitempty"` DeletedTime time.Time `gorm:"column:deleted_time" json:"deletedAt,omitempty"` InitStartTime time.Time `gorm:"column:init_start_time" json:"initStartTime,omitempty"` ImageNameToPullTime map[string]float64 `gorm:"-"` PossibleReason string `gorm:"-"` PossibleReasonStr string `gorm:"column:possible_reason" json:"possiblereason,omitempty"` SLOViolationReason string `gorm:"column:slo_violation_reason" json:"sloviolationreason,omitempty"` PodSLO int64 `gorm:"column:pod_slo" json:"podslo,omitempty"` DeliverySLO int64 `gorm:"column:delivery_slo" json:"deliveryslo,omitempty"` DeliverySLOAdjusted bool `gorm:"column:delivery_slo_adjusted" json:"deliverysloadjusted,omitempty"` DeliveryDuration time.Duration `gorm:"column:delivery_duration" json:"deliveryduration,omitempty"` DeliveryStatus string `gorm:"column:delivery_status" json:"deliverystatus,omitempty"` DeliveryStatusOrig string `gorm:"column:delivery_status_orig" json:"deliverystatusorig,omitempty"` SloHint string `gorm:"column:slo_hint" json:"slohint,omitempty"` PullTimeoutImageName string `gorm:"-"` DeleteEndTime time.Time DeleteTimeoutTime time.Time UpgradeEndTime time.Time UpgradeTimeoutTime time.Time UpgradeResult string DeleteResult string }
func (*Slodata) EsTableName ¶
type Span ¶
type Span struct { DocId string `gorm:"column:doc_id"` Name string `json:"name,omitempty" gorm:"column:or_name"` OrResource string `gorm:"column:or_resource"` OrNamespace string `gorm:"column:or_namespace"` OrUID string `gorm:"column:or_uid"` OrAPIGroup string `gorm:"column:or_apigroup"` OrAPIVersion string `gorm:"column:or_apiversion"` OrResourceVersion string `gorm:"column:or_resource_version"` OrSubresource string `gorm:"column:or_subresource"` SpanName string `gorm:"column:span_name" ` Type string `json:"type,omitempty" gorm:"column:span_type"` Begin time.Time `json:"begin,omitempty" gorm:"column:span_begin"` End time.Time `json:"end,omitempty" gorm:"column:span_end"` Elapsed int64 `json:"elapsed,omitempty" gorm:"column:span_elapsed"` Cluster string `json:"cluster,omitempty" gorm:"column:span_cluster"` ActionType string `json:"actionType,omitempty" gorm:"column:span_action_type"` TimeStamp time.Time `json:"timeStamp,omitempty" gorm:"column:span_timestamp"` Omitempty bool `json:"omitempty,omitempty" gorm:"column:span_omitempty"` SpanConfig string `gorm:"column:span_config"` Sqlroperties string `gorm:"column:properties"` }
对外数据模型
func (*Span) EsTableName ¶
当前 es 和 ob 版本的表名还不一致, 过度阶段增加一个EsTableName()返回 Es的表名 后续表名统一后, 删除 EsTableName() 仅使用 TableName()
type Spans ¶
type Spans struct { TraceID string `json:"traceID"` SpanID string `json:"spanID"` OperationName string `json:"operationName"` References []References `json:"references"` StartTime int64 `json:"startTime"` Duration int64 `json:"duration"` Tags []Tags `json:"tags"` Logs []interface{} `json:"logs"` ProcessID string `json:"processID"` Warnings interface{} `json:"warnings"` }
type TraceDetailMetaData ¶
type TraceListMetaData ¶
type TraceListMetaData struct { DeliveryInfo DeliveryInfo `json:"deliveryInfo"` Resource Resource `json:"resource"` }
type TraceStats ¶
type TraceStats struct { Cluster string `json:"Cluster"` Namespace string `json:"Namespace"` Name string `json:"Name"` UID string `json:"UID"` TraceType string `json:"TraceType"` StartTimestamp time.Time `json:"StartTimestamp"` Error bool `json:"Error"` FailModule string `json:"FailModule"` FailReason string `json:"FailReason"` FailMessage string `json:"FailMessage"` Owner string `json:"接口人"` HostIP string }
Click to show internal directories.
Click to hide internal directories.