Documentation
¶
Index ¶
- Constants
- Variables
- func FormatJobMetricsLogBlock(metrics map[string]interface{}, at time.Time, final bool) string
- func JobPrometheusMetricsPath() string
- func ServeJobPrometheusMetrics(w http.ResponseWriter, r *http.Request)
- type AgentCommandSender
- type BasicResponse
- type CancelByRefRequest
- type CancelJobRequest
- type CheckpointSnapshot
- type CheckpointSnapshotResponse
- type ClusterEngineEndpointLister
- type ClusterLogProvider
- type ClusterRuntimeResolver
- type ClusterVersionProvider
- type ConfigToolClient
- type ConfigToolContentRequest
- type ConfigToolDAGResponse
- type ConfigToolError
- type ConfigToolGraph
- type ConfigToolPluginEnumValuesRequest
- type ConfigToolPluginEnumValuesResponse
- type ConfigToolPluginFactoryInfo
- type ConfigToolPluginListRequest
- type ConfigToolPluginListResponse
- type ConfigToolPluginOptionDescriptor
- type ConfigToolPluginOptionsRequest
- type ConfigToolPluginOptionsResponse
- type ConfigToolPluginTemplateRequest
- type ConfigToolPluginTemplateResponse
- type ConfigToolPreviewRequest
- type ConfigToolPreviewResponse
- type ConfigToolResolver
- type ConfigToolSinkSaveModePreviewAction
- type ConfigToolSinkSaveModePreviewRequest
- type ConfigToolSinkSaveModePreviewResponse
- type ConfigToolSinkSaveModePreviewTable
- type ConfigToolValidateRequest
- type ConfigToolValidateResponse
- type ConfigToolValidationCheck
- type ConfigToolWebUIDAGEdge
- type ConfigToolWebUIDAGResponse
- type ConfigToolWebUIDAGVertexInfo
- type ConfigToolWebUIJobDAG
- type ContentFormat
- type CreateCuratedTemplateRequest
- type CreateGlobalVariableRequest
- type CreateTaskRequest
- type CuratedComboParseData
- type CuratedComboParseResponse
- type CuratedTemplate
- type CuratedTemplateListData
- type CuratedTemplateListResponse
- type CuratedTemplateResponse
- type CuratedTemplateView
- type DAGResponse
- type DAGResult
- type DefaultClusterRuntimeResolver
- type DefaultConfigToolClient
- func (c *DefaultConfigToolClient) DeriveSourcePreview(ctx context.Context, endpoint string, req *ConfigToolPreviewRequest) (*ConfigToolPreviewResponse, error)
- func (c *DefaultConfigToolClient) DeriveTransformPreview(ctx context.Context, endpoint string, req *ConfigToolPreviewRequest) (*ConfigToolPreviewResponse, error)
- func (c *DefaultConfigToolClient) GetPluginOptions(ctx context.Context, endpoint string, req *ConfigToolPluginOptionsRequest) (*ConfigToolPluginOptionsResponse, error)
- func (c *DefaultConfigToolClient) InspectDAG(ctx context.Context, endpoint string, req *ConfigToolContentRequest) (*ConfigToolDAGResponse, error)
- func (c *DefaultConfigToolClient) InspectWebUIDAG(ctx context.Context, endpoint string, req *ConfigToolContentRequest) (*ConfigToolWebUIDAGResponse, error)
- func (c *DefaultConfigToolClient) ListPluginEnumValues(ctx context.Context, endpoint string, req *ConfigToolPluginEnumValuesRequest) (*ConfigToolPluginEnumValuesResponse, error)
- func (c *DefaultConfigToolClient) ListPlugins(ctx context.Context, endpoint string, req *ConfigToolPluginListRequest) (*ConfigToolPluginListResponse, error)
- func (c *DefaultConfigToolClient) PreviewSinkSaveMode(ctx context.Context, endpoint string, ...) (*ConfigToolSinkSaveModePreviewResponse, error)
- func (c *DefaultConfigToolClient) RenderPluginTemplate(ctx context.Context, endpoint string, req *ConfigToolPluginTemplateRequest) (*ConfigToolPluginTemplateResponse, error)
- func (c *DefaultConfigToolClient) ValidateConfig(ctx context.Context, endpoint string, req *ConfigToolValidateRequest) (*ConfigToolValidateResponse, error)
- type DefaultConfigToolResolver
- type DefaultExecutionTargetResolver
- type DolphinBuiltinSchedule
- type DolphinClient
- func (c *DolphinClient) CreateDefinition(ctx context.Context, projectCode int64, graph *dolphinGraph) (*dolphinGraph, error)
- func (c *DolphinClient) CreateSchedule(ctx context.Context, projectCode, workflowCode int64, crontab, timezone string) error
- func (c *DolphinClient) GenTaskCodes(ctx context.Context, projectCode int64, n int) ([]int64, error)
- func (c *DolphinClient) GetDefinition(ctx context.Context, projectCode, workflowCode int64) (*dolphinGraph, error)
- func (c *DolphinClient) ListProjects(ctx context.Context) ([]DolphinProject, error)
- func (c *DolphinClient) ListSchedules(ctx context.Context, projectCode, workflowCode int64) ([]DolphinScheduleInfo, error)
- func (c *DolphinClient) ListWorkflows(ctx context.Context, projectCode int64) ([]DolphinWorkflowSummary, error)
- func (c *DolphinClient) OnlineSchedule(ctx context.Context, projectCode, scheduleID int64) error
- func (c *DolphinClient) OnlineSchedules(ctx context.Context, projectCode, workflowCode int64) error
- func (c *DolphinClient) Release(ctx context.Context, projectCode, workflowCode int64, state string) error
- func (c *DolphinClient) ResolveEnvironmentCode(ctx context.Context, name string) (int64, error)
- func (c *DolphinClient) UpdateDefinition(ctx context.Context, projectCode int64, graph *dolphinGraph) error
- type DolphinProject
- type DolphinProjectListResponse
- type DolphinPushRequest
- type DolphinPushResponse
- type DolphinPushResult
- type DolphinScheduleInfo
- type DolphinScriptResponse
- type DolphinScriptResult
- type DolphinTaskStatus
- type DolphinTaskStatusResponse
- type DolphinWorkflowDetail
- type DolphinWorkflowDetailResponse
- type DolphinWorkflowListResponse
- type DolphinWorkflowRelation
- type DolphinWorkflowSummary
- type DolphinWorkflowTask
- type EngineCallUnknownError
- type EngineCheckpoint
- type EngineCheckpointInProgress
- type EngineCheckpointOverview
- type EngineCheckpointPipeline
- type EngineCheckpointRecord
- type EngineClient
- type EngineEndpoint
- type EngineEvent
- type EngineEventChannel
- type EngineEventIngestResponse
- type EngineEventIngestResult
- type EngineEventReportNodeResult
- type EngineEventReportSettings
- type EngineJobInfo
- type EngineJobListItem
- type EngineRealtimeClient
- type EngineRealtimeEdge
- type EngineRealtimeJobMeta
- type EngineRealtimeJobs
- type EngineRealtimeSeries
- type EngineRealtimeVertex
- type EngineSubmitRequest
- type EngineSubmitResponse
- type EventChannelResponse
- type EventChannelStatus
- type EventReportConfigApplier
- type ExecutionRequest
- type ExecutionTarget
- type ExecutionTargetResolver
- type ForkCuratedTemplateRequest
- type GetSyncPluginOptionsRequest
- type GlobalVariable
- type GlobalVariableListData
- type GlobalVariableListResponse
- type GlobalVariableResponse
- type Handler
- func (h *Handler) CancelJob(c *gin.Context)
- func (h *Handler) CancelJobByRef(c *gin.Context)
- func (h *Handler) CollectPreview(c *gin.Context)
- func (h *Handler) CreateCuratedTemplate(c *gin.Context)
- func (h *Handler) CreateGlobalVariable(c *gin.Context)
- func (h *Handler) CreateSchedulerConnection(c *gin.Context)
- func (h *Handler) CreateTask(c *gin.Context)
- func (h *Handler) DeleteCuratedTemplate(c *gin.Context)
- func (h *Handler) DeleteGlobalVariable(c *gin.Context)
- func (h *Handler) DeleteTask(c *gin.Context)
- func (h *Handler) DeleteTaskAlert(c *gin.Context)
- func (h *Handler) DeleteTaskVersion(c *gin.Context)
- func (h *Handler) ForkCuratedTemplate(c *gin.Context)
- func (h *Handler) GetDolphinScript(c *gin.Context)
- func (h *Handler) GetDolphinTaskStatus(c *gin.Context)
- func (h *Handler) GetDolphinWorkflow(c *gin.Context)
- func (h *Handler) GetEventChannel(c *gin.Context)
- func (h *Handler) GetJob(c *gin.Context)
- func (h *Handler) GetJobCheckpointSnapshot(c *gin.Context)
- func (h *Handler) GetJobLogs(c *gin.Context)
- func (h *Handler) GetJobPlanDAG(c *gin.Context)
- func (h *Handler) GetJobPrometheusMetrics(c *gin.Context)
- func (h *Handler) GetJobRealtime(c *gin.Context)
- func (h *Handler) GetJobTimeseries(c *gin.Context)
- func (h *Handler) GetPluginOptions(c *gin.Context)
- func (h *Handler) GetPreviewSnapshot(c *gin.Context)
- func (h *Handler) GetTask(c *gin.Context)
- func (h *Handler) GetTaskAlert(c *gin.Context)
- func (h *Handler) GetTaskDAG(c *gin.Context)
- func (h *Handler) GetTaskPermissions(c *gin.Context)
- func (h *Handler) GetTaskTree(c *gin.Context)
- func (h *Handler) IngestEngineEvents(c *gin.Context)
- func (h *Handler) ListCuratedTemplates(c *gin.Context)
- func (h *Handler) ListDolphinProjects(c *gin.Context)
- func (h *Handler) ListDolphinWorkflows(c *gin.Context)
- func (h *Handler) ListGlobalVariables(c *gin.Context)
- func (h *Handler) ListJobEvents(c *gin.Context)
- func (h *Handler) ListJobs(c *gin.Context)
- func (h *Handler) ListPluginEnumCatalog(c *gin.Context)
- func (h *Handler) ListPluginEnumValues(c *gin.Context)
- func (h *Handler) ListPluginFactories(c *gin.Context)
- func (h *Handler) ListSchedulerConnections(c *gin.Context)
- func (h *Handler) ListTaskVersions(c *gin.Context)
- func (h *Handler) ListTasks(c *gin.Context)
- func (h *Handler) ParseCuratedCombo(c *gin.Context)
- func (h *Handler) PreviewSinkSaveMode(c *gin.Context)
- func (h *Handler) PreviewTask(c *gin.Context)
- func (h *Handler) PublishTask(c *gin.Context)
- func (h *Handler) PushDolphin(c *gin.Context)
- func (h *Handler) RecoverJob(c *gin.Context)
- func (h *Handler) RenderCuratedTemplate(c *gin.Context)
- func (h *Handler) RenderPluginTemplate(c *gin.Context)
- func (h *Handler) RollbackTaskVersion(c *gin.Context)
- func (h *Handler) SetAuditRepository(repo *audit.Repository)
- func (h *Handler) SubmitTask(c *gin.Context)
- func (h *Handler) TestTaskConnections(c *gin.Context)
- func (h *Handler) UnbindDolphin(c *gin.Context)
- func (h *Handler) UpdateCuratedTemplate(c *gin.Context)
- func (h *Handler) UpdateEventChannel(c *gin.Context)
- func (h *Handler) UpdateGlobalVariable(c *gin.Context)
- func (h *Handler) UpdateSchedulerConnection(c *gin.Context)
- func (h *Handler) UpdateTask(c *gin.Context)
- func (h *Handler) UpdateTaskAlert(c *gin.Context)
- func (h *Handler) UpdateTaskPermissions(c *gin.Context)
- func (h *Handler) ValidateTask(c *gin.Context)
- type JSONMap
- type JSONStringSlice
- type JobCDCDelay
- type JobEventListResponse
- type JobEventListResult
- type JobFilter
- type JobIDGenerator
- type JobInstance
- type JobListData
- type JobListResponse
- type JobLogsResponse
- type JobLogsResult
- type JobPlanDAGResponse
- type JobPlanDAGResult
- type JobRealtimeResponse
- type JobRealtimeResult
- type JobResponse
- type JobStatus
- type JobSyncState
- type JobTimeseriesAnnotation
- type JobTimeseriesResponse
- type JobTimeseriesResult
- type JobTimeseriesSeries
- type ListCuratedTemplatesRequest
- type ListSyncPluginEnumCatalogRequest
- type ListSyncPluginEnumValuesRequest
- type ListSyncPluginFactoriesRequest
- type LocalRunResponse
- type LocalStatusResponse
- type ParseCuratedComboRequest
- type PluginEnumCatalogResponse
- type PluginEnumValuesResponse
- type PluginFactoryListResponse
- type PluginOptionSchemaResponse
- type PluginTemplateResponse
- type PreviewCollectRequest
- type PreviewRow
- type PreviewSession
- type PreviewSnapshot
- type PreviewSnapshotResponse
- type PreviewSyncSinkSaveModeRequest
- type PreviewTable
- type PreviewTableData
- type PreviewTaskRequest
- type PublishTaskRequest
- type RealtimeEdge
- type RealtimeHint
- type RealtimeVertex
- type RecoverJobRequest
- type RecoverTaskRequest
- type RenderSyncPluginTemplateRequest
- type Repository
- func (r *Repository) BumpEngineEventDelayIfGreater(ctx context.Context, events []*EngineEvent) (int, error)
- func (r *Repository) CreateCuratedTemplate(ctx context.Context, item *CuratedTemplate) error
- func (r *Repository) CreateGlobalVariable(ctx context.Context, item *GlobalVariable) error
- func (r *Repository) CreateJobInstance(ctx context.Context, instance *JobInstance) error
- func (r *Repository) CreatePreviewRows(ctx context.Context, rows []*PreviewRow) error
- func (r *Repository) CreatePreviewSession(ctx context.Context, session *PreviewSession) error
- func (r *Repository) CreatePreviewTable(ctx context.Context, table *PreviewTable) error
- func (r *Repository) CreateSchedulerConnection(ctx context.Context, item *SchedulerConnection) error
- func (r *Repository) CreateTask(ctx context.Context, task *Task) error
- func (r *Repository) CreateTaskVersion(ctx context.Context, version *TaskVersion) error
- func (r *Repository) DeleteCuratedTemplate(ctx context.Context, id uint) error
- func (r *Repository) DeleteGlobalVariable(ctx context.Context, id uint) error
- func (r *Repository) DeleteJobInstancesByTaskIDs(ctx context.Context, taskIDs []uint) error
- func (r *Repository) DeletePreviewRowsBySessionIDs(ctx context.Context, sessionIDs []uint) error
- func (r *Repository) DeletePreviewRowsByTableID(ctx context.Context, tableID uint) error
- func (r *Repository) DeletePreviewRowsByTaskIDs(ctx context.Context, taskIDs []uint) error
- func (r *Repository) DeletePreviewSessionsByIDs(ctx context.Context, sessionIDs []uint) error
- func (r *Repository) DeletePreviewSessionsByTaskIDs(ctx context.Context, taskIDs []uint) error
- func (r *Repository) DeletePreviewTablesBySessionIDs(ctx context.Context, sessionIDs []uint) error
- func (r *Repository) DeletePreviewTablesByTaskIDs(ctx context.Context, taskIDs []uint) error
- func (r *Repository) DeleteSchedulerBindingByTaskID(ctx context.Context, taskID uint) error
- func (r *Repository) DeleteSchedulerConnection(ctx context.Context, id uint) error
- func (r *Repository) DeleteTaskVersion(ctx context.Context, taskID uint, versionID uint) error
- func (r *Repository) DeleteTaskVersionsByTaskIDs(ctx context.Context, taskIDs []uint) error
- func (r *Repository) DeleteTasksByIDs(ctx context.Context, taskIDs []uint) error
- func (r *Repository) ExistingEngineEventDedupeKeys(ctx context.Context, keys []string) (map[string]bool, error)
- func (r *Repository) ExistsSiblingTaskName(ctx context.Context, parentID *uint, name string, excludeID *uint) (bool, error)
- func (r *Repository) FindLatestJobInstanceByEngineJobID(ctx context.Context, engineJobID string) (*JobInstance, error)
- func (r *Repository) GetActiveJobByExternalRef(ctx context.Context, ref string) (*JobInstance, error)
- func (r *Repository) GetCuratedTemplateByID(ctx context.Context, id uint) (*CuratedTemplate, error)
- func (r *Repository) GetCuratedTemplateByOwnerAndBuiltin(ctx context.Context, ownerUserID uint, builtinID string) (*CuratedTemplate, error)
- func (r *Repository) GetEngineEventChannel(ctx context.Context, clusterID uint) (*EngineEventChannel, error)
- func (r *Repository) GetGlobalVariableByID(ctx context.Context, id uint) (*GlobalVariable, error)
- func (r *Repository) GetGlobalVariableByKey(ctx context.Context, key string) (*GlobalVariable, error)
- func (r *Repository) GetJobInstanceByID(ctx context.Context, id uint) (*JobInstance, error)
- func (r *Repository) GetJobInstanceByIDForOwner(ctx context.Context, id, ownerUserID uint, includeAll bool) (*JobInstance, error)
- func (r *Repository) GetLatestScheduledJobInstancesByTaskIDs(ctx context.Context, taskIDs []uint) (map[uint]*JobInstance, error)
- func (r *Repository) GetPreviewJobInstanceByPlatformOrEngineJobID(ctx context.Context, platformJobID string, engineJobID string) (*JobInstance, error)
- func (r *Repository) GetPreviewSessionByJobInstanceID(ctx context.Context, jobInstanceID uint) (*PreviewSession, error)
- func (r *Repository) GetPreviewTableByPath(ctx context.Context, sessionID uint, tablePath string) (*PreviewTable, error)
- func (r *Repository) GetSchedulerBindingByTaskID(ctx context.Context, taskID uint) (*TaskSchedulerBinding, error)
- func (r *Repository) GetSchedulerConnectionByID(ctx context.Context, id uint) (*SchedulerConnection, error)
- func (r *Repository) GetTaskByID(ctx context.Context, id uint) (*Task, error)
- func (r *Repository) GetTaskVersionByID(ctx context.Context, taskID uint, versionID uint) (*TaskVersion, error)
- func (r *Repository) GetTaskVersionByVersion(ctx context.Context, taskID uint, version int) (*TaskVersion, error)
- func (r *Repository) HasScheduledJobInstanceInWindow(ctx context.Context, taskID uint, startedAt time.Time, finishedAt time.Time) (bool, error)
- func (r *Repository) InsertEngineEventsIgnoreDuplicates(ctx context.Context, events []*EngineEvent) error
- func (r *Repository) ListAllTasks(ctx context.Context) ([]*Task, error)
- func (r *Repository) ListCuratedTemplatesByOwner(ctx context.Context, ownerUserID uint) ([]*CuratedTemplate, error)
- func (r *Repository) ListEngineEventChannels(ctx context.Context) ([]*EngineEventChannel, error)
- func (r *Repository) ListEngineEventsByJob(ctx context.Context, jobInstanceID uint, eventTypes []string, page, size int) ([]*EngineEvent, int64, error)
- func (r *Repository) ListExpiredPreviewSessions(ctx context.Context, cutoff time.Time) ([]*PreviewSession, error)
- func (r *Repository) ListGlobalVariables(ctx context.Context) ([]*GlobalVariable, error)
- func (r *Repository) ListGlobalVariablesPaginated(ctx context.Context, page, size int) ([]*GlobalVariable, int64, error)
- func (r *Repository) ListJobInstances(ctx context.Context, filter *JobFilter) ([]*JobInstance, int64, error)
- func (r *Repository) ListNonTerminalJobInstances(ctx context.Context, limit int) ([]*JobInstance, error)
- func (r *Repository) ListPendingJobInstancesByTaskID(ctx context.Context, taskID uint, limit int) ([]*JobInstance, error)
- func (r *Repository) ListPreviewRowsByTableID(ctx context.Context, tableID uint, offset, limit int) ([]*PreviewRow, error)
- func (r *Repository) ListPreviewTablesBySessionID(ctx context.Context, sessionID uint) ([]*PreviewTable, error)
- func (r *Repository) ListRecentFailedJobsWithoutError(ctx context.Context, since time.Time, limit int) ([]*JobInstance, error)
- func (r *Repository) ListRecentJobsByExternalRefPrefix(ctx context.Context, taskID uint, prefix string, limit int) ([]*JobInstance, error)
- func (r *Repository) ListRecentTerminalJobInstances(ctx context.Context, limit int, since time.Time) ([]*JobInstance, error)
- func (r *Repository) ListSchedulerConnections(ctx context.Context) ([]*SchedulerConnection, error)
- func (r *Repository) ListTaskVersionsByTaskID(ctx context.Context, taskID uint) ([]*TaskVersion, error)
- func (r *Repository) ListTaskVersionsByTaskIDPaginated(ctx context.Context, taskID uint, page, size int) ([]*TaskVersion, int64, error)
- func (r *Repository) ListTasks(ctx context.Context, filter *TaskFilter) ([]*Task, int64, error)
- func (r *Repository) ListTimedOutPreviewSessions(ctx context.Context, now time.Time) ([]*PreviewSession, error)
- func (r *Repository) PurgeEngineEventsBefore(ctx context.Context, cutoff time.Time) (int64, error)
- func (r *Repository) SaveEngineEventChannel(ctx context.Context, channel *EngineEventChannel) error
- func (r *Repository) SaveSchedulerBinding(ctx context.Context, item *TaskSchedulerBinding) error
- func (r *Repository) Transaction(ctx context.Context, fn func(tx *Repository) error) error
- func (r *Repository) UpdateCuratedTemplate(ctx context.Context, item *CuratedTemplate) error
- func (r *Repository) UpdateEngineEventChannelStats(ctx context.Context, clusterID uint, counters map[string]int64, ...) error
- func (r *Repository) UpdateGlobalVariable(ctx context.Context, item *GlobalVariable) error
- func (r *Repository) UpdateJobInstance(ctx context.Context, instance *JobInstance) error
- func (r *Repository) UpdateJobStatus(ctx context.Context, id uint, expected []JobStatus, updates map[string]any) error
- func (r *Repository) UpdateJobSyncMetadata(ctx context.Context, id uint, updates map[string]any) error
- func (r *Repository) UpdatePreviewSession(ctx context.Context, session *PreviewSession) error
- func (r *Repository) UpdatePreviewTable(ctx context.Context, table *PreviewTable) error
- func (r *Repository) UpdateSchedulerConnection(ctx context.Context, item *SchedulerConnection) error
- func (r *Repository) UpdateTask(ctx context.Context, task *Task) error
- type RunType
- type SchedulerConnection
- type SchedulerConnectionListData
- type SchedulerConnectionListResponse
- type SchedulerConnectionRequest
- type SchedulerConnectionResponse
- type SeaTunnelEngineClient
- func (c *SeaTunnelEngineClient) GetJobCheckpointHistory(ctx context.Context, endpoint *EngineEndpoint, jobID string, pipelineID *int, ...) ([]*EngineCheckpointRecord, error)
- func (c *SeaTunnelEngineClient) GetJobCheckpointOverview(ctx context.Context, endpoint *EngineEndpoint, jobID string) (*EngineCheckpointOverview, error)
- func (c *SeaTunnelEngineClient) GetJobInfo(ctx context.Context, endpoint *EngineEndpoint, jobID string) (*EngineJobInfo, error)
- func (c *SeaTunnelEngineClient) GetJobLogs(ctx context.Context, endpoint *EngineEndpoint, jobID string) (string, error)
- func (c *SeaTunnelEngineClient) GetRealtimeEdges(ctx context.Context, endpoint *EngineEndpoint, jobID string, windowMs int64) (*EngineRealtimeSeries, error)
- func (c *SeaTunnelEngineClient) GetRealtimeJobs(ctx context.Context, endpoint *EngineEndpoint) (*EngineRealtimeJobs, error)
- func (c *SeaTunnelEngineClient) GetRealtimeVertices(ctx context.Context, endpoint *EngineEndpoint, jobID string, windowMs int64) (*EngineRealtimeSeries, error)
- func (c *SeaTunnelEngineClient) ListFinishedJobs(ctx context.Context, endpoint *EngineEndpoint, state string) ([]*EngineJobListItem, error)
- func (c *SeaTunnelEngineClient) ListRunningJobs(ctx context.Context, endpoint *EngineEndpoint) ([]*EngineJobListItem, error)
- func (c *SeaTunnelEngineClient) StopJob(ctx context.Context, endpoint *EngineEndpoint, jobID string, ...) error
- func (c *SeaTunnelEngineClient) Submit(ctx context.Context, req *EngineSubmitRequest) (*EngineSubmitResponse, error)
- type Service
- func (s *Service) BuildTaskDAG(ctx context.Context, id uint, draft *TaskDraftPayload) (*DAGResult, error)
- func (s *Service) BuildTaskDAGForActor(ctx context.Context, actor executionapp.Actor, id uint, ...) (*DAGResult, error)
- func (s *Service) CancelJob(ctx context.Context, id uint, stopWithSavepoint bool) (*JobInstance, error)
- func (s *Service) CancelJobByRef(ctx context.Context, actor executionapp.Actor, ref string, generation int) (*JobInstance, error)
- func (s *Service) CancelJobForActor(ctx context.Context, actor executionapp.Actor, id uint, stopWithSavepoint bool) (*JobInstance, error)
- func (s *Service) CollectPreview(ctx context.Context, req *PreviewCollectRequest) error
- func (s *Service) CreateCuratedTemplate(ctx context.Context, req *CreateCuratedTemplateRequest, userID uint) (*CuratedTemplateView, error)
- func (s *Service) CreateGlobalVariable(ctx context.Context, req *CreateGlobalVariableRequest, createdBy uint) (*GlobalVariable, error)
- func (s *Service) CreateSchedulerConnection(ctx context.Context, req *SchedulerConnectionRequest, createdBy uint) (*SchedulerConnection, error)
- func (s *Service) CreateTask(ctx context.Context, req *CreateTaskRequest, createdBy uint) (*Task, error)
- func (s *Service) DeleteCuratedTemplate(ctx context.Context, id uint, userID uint) error
- func (s *Service) DeleteGlobalVariable(ctx context.Context, id uint) error
- func (s *Service) DeleteGlobalVariableForActor(ctx context.Context, actor executionapp.Actor, id uint) error
- func (s *Service) DeleteTask(ctx context.Context, id uint) error
- func (s *Service) DeleteTaskAlertForActor(ctx context.Context, actor executionapp.Actor, taskID uint) error
- func (s *Service) DeleteTaskForActor(ctx context.Context, actor executionapp.Actor, id uint) error
- func (s *Service) DeleteTaskVersion(ctx context.Context, id uint, versionID uint) error
- func (s *Service) DeleteTaskVersionForActor(ctx context.Context, actor executionapp.Actor, id uint, versionID uint) error
- func (s *Service) ForkCuratedTemplate(ctx context.Context, req *ForkCuratedTemplateRequest, userID uint) (*CuratedTemplateView, error)
- func (s *Service) GetCuratedTemplateContentForInsert(ctx context.Context, builtinID string, userID uint, dbID uint, clusterID uint) (string, error)
- func (s *Service) GetDolphinScript(ctx context.Context, actor executionapp.Actor, taskID uint, ...) (*DolphinScriptResult, error)
- func (s *Service) GetDolphinTaskStatus(ctx context.Context, actor executionapp.Actor, taskID uint) (*DolphinTaskStatus, error)
- func (s *Service) GetDolphinWorkflow(ctx context.Context, connectionID uint, projectCode, workflowCode int64) (*DolphinWorkflowDetail, error)
- func (s *Service) GetEventChannel(ctx context.Context, clusterID uint) (*EventChannelStatus, error)
- func (s *Service) GetJob(ctx context.Context, id uint) (*JobInstance, error)
- func (s *Service) GetJobCheckpointSnapshot(ctx context.Context, jobID uint, pipelineID *int, limit int, status string) (*CheckpointSnapshot, error)
- func (s *Service) GetJobCheckpointSnapshotForActor(ctx context.Context, actor executionapp.Actor, id uint, pipelineID *int, ...) (*CheckpointSnapshot, error)
- func (s *Service) GetJobForActor(ctx context.Context, actor executionapp.Actor, id uint, fresh bool) (*JobInstance, error)
- func (s *Service) GetJobLogs(ctx context.Context, id uint, offset string, limitBytes int, keyword string, ...) (*JobLogsResult, error)
- func (s *Service) GetJobLogsForActor(ctx context.Context, actor executionapp.Actor, id uint, offset string, ...) (*JobLogsResult, error)
- func (s *Service) GetJobPlanDAGForActor(ctx context.Context, actor executionapp.Actor, id uint) (*JobPlanDAGResult, error)
- func (s *Service) GetJobRealtimeForActor(ctx context.Context, actor executionapp.Actor, id uint, windowMs int64) (*JobRealtimeResult, error)
- func (s *Service) GetJobTimeseriesForActor(ctx context.Context, actor executionapp.Actor, id uint, ...) (*JobTimeseriesResult, error)
- func (s *Service) GetPluginOptions(ctx context.Context, req *GetSyncPluginOptionsRequest) (*SyncPluginOptionSchemaResult, error)
- func (s *Service) GetPreviewSnapshot(ctx context.Context, jobID uint, tablePath string) (*PreviewSnapshot, error)
- func (s *Service) GetPreviewSnapshotForActor(ctx context.Context, actor executionapp.Actor, id uint, tablePath string) (*PreviewSnapshot, error)
- func (s *Service) GetTask(ctx context.Context, id uint) (*Task, error)
- func (s *Service) GetTaskAlertForActor(ctx context.Context, actor executionapp.Actor, taskID uint) (*syncalert.TaskConfig, error)
- func (s *Service) GetTaskForActor(ctx context.Context, actor executionapp.Actor, id uint) (*Task, error)
- func (s *Service) GetTaskPermissionsForActor(ctx context.Context, actor executionapp.Actor, id uint) (*TaskPermissions, error)
- func (s *Service) GetTaskTree(ctx context.Context) ([]*TaskTreeNode, error)
- func (s *Service) GetTaskTreeForActor(ctx context.Context, actor executionapp.Actor) ([]*TaskTreeNode, error)
- func (s *Service) IngestEngineEvents(ctx context.Context, clusterID uint, authorization string, body []byte) (*EngineEventIngestResult, error)
- func (s *Service) ListClusterRunningJobs(ctx context.Context, clusterID uint) ([]*EngineJobListItem, error)
- func (s *Service) ListCuratedTemplates(ctx context.Context, req *ListCuratedTemplatesRequest, userID uint) (*CuratedTemplateListData, error)
- func (s *Service) ListDolphinProjects(ctx context.Context, connectionID uint) ([]DolphinProject, error)
- func (s *Service) ListDolphinWorkflows(ctx context.Context, connectionID uint, projectCode int64) ([]DolphinWorkflowSummary, error)
- func (s *Service) ListGlobalVariables(ctx context.Context) ([]*GlobalVariable, error)
- func (s *Service) ListGlobalVariablesPaginated(ctx context.Context, page, size int) ([]*GlobalVariable, int64, error)
- func (s *Service) ListJobEventsForActor(ctx context.Context, actor executionapp.Actor, jobID uint, eventTypes []string, ...) (*JobEventListResult, error)
- func (s *Service) ListJobs(ctx context.Context, filter *JobFilter) ([]*JobInstance, int64, error)
- func (s *Service) ListJobsForActor(ctx context.Context, actor executionapp.Actor, filter *JobFilter) ([]*JobInstance, int64, error)
- func (s *Service) ListPluginEnumCatalog(ctx context.Context, req *ListSyncPluginEnumCatalogRequest) (*SyncPluginEnumCatalogResult, error)
- func (s *Service) ListPluginEnumValues(ctx context.Context, req *ListSyncPluginEnumValuesRequest) (*SyncPluginEnumValuesResult, error)
- func (s *Service) ListPluginFactories(ctx context.Context, req *ListSyncPluginFactoriesRequest) (*SyncPluginFactoryListResult, error)
- func (s *Service) ListSchedulerConnections(ctx context.Context) ([]*SchedulerConnection, error)
- func (s *Service) ListTaskVersions(ctx context.Context, id uint) ([]*TaskVersion, error)
- func (s *Service) ListTaskVersionsPaginated(ctx context.Context, id uint, page, size int) ([]*TaskVersion, int64, error)
- func (s *Service) ListTaskVersionsPaginatedForActor(ctx context.Context, actor executionapp.Actor, id uint, page, size int) ([]*TaskVersion, int64, error)
- func (s *Service) ListTasks(ctx context.Context, filter *TaskFilter) ([]*Task, int64, error)
- func (s *Service) ParseCuratedCombo(_ context.Context, req *ParseCuratedComboRequest) (*CuratedComboParseData, error)
- func (s *Service) PreviewSinkSaveMode(ctx context.Context, taskID uint, req *PreviewSyncSinkSaveModeRequest) (*SyncSinkSaveModePreviewResult, error)
- func (s *Service) PreviewTask(ctx context.Context, id uint, createdBy uint, opts *PreviewTaskRequest) (*JobInstance, error)
- func (s *Service) PreviewTaskForActor(ctx context.Context, actor executionapp.Actor, id uint, ...) (*JobInstance, error)
- func (s *Service) PreviewTaskWithExecution(ctx context.Context, id, createdBy uint, opts *PreviewTaskRequest, ...) (*JobInstance, error)
- func (s *Service) PublishTask(ctx context.Context, id uint, comment string, createdBy uint) (*Task, *TaskVersion, error)
- func (s *Service) PublishTaskForActor(ctx context.Context, actor executionapp.Actor, id uint, comment string, ...) (*Task, *TaskVersion, error)
- func (s *Service) PushDolphin(ctx context.Context, actor executionapp.Actor, taskID uint, ...) (*DolphinPushResult, error)
- func (s *Service) RecoverJob(ctx context.Context, sourceJobID uint, createdBy uint, draft *TaskDraftPayload) (*JobInstance, error)
- func (s *Service) RecoverJobWithExecution(ctx context.Context, sourceJobID, createdBy uint, draft *TaskDraftPayload, ...) (*JobInstance, error)
- func (s *Service) RefreshJobByID(ctx context.Context, id uint) (*JobInstance, error)
- func (s *Service) RenderPluginTemplate(ctx context.Context, req *RenderSyncPluginTemplateRequest) (*SyncPluginTemplateResult, error)
- func (s *Service) RequestCancel(ctx context.Context, item *executionapp.Execution, _ executionapp.Actor) (executionapp.CancelResult, error)
- func (s *Service) ResolveTaskNames(ctx context.Context, taskIDs []uint) map[uint]string
- func (s *Service) RollbackTaskVersion(ctx context.Context, id uint, versionID uint) (*Task, error)
- func (s *Service) RollbackTaskVersionForActor(ctx context.Context, actor executionapp.Actor, id uint, versionID uint) (*Task, error)
- func (s *Service) SetAgentCommandSender(sender AgentCommandSender)
- func (s *Service) SetAlertReporter(reporter syncalert.Reporter)
- func (s *Service) SetClusterLogProvider(provider ClusterLogProvider)
- func (s *Service) SetClusterVersionProvider(provider ClusterVersionProvider)
- func (s *Service) SetConfigToolClient(client ConfigToolClient)
- func (s *Service) SetConfigToolResolver(resolver ConfigToolResolver)
- func (s *Service) SetDolphinHTTPClient(client *http.Client)
- func (s *Service) SetEngineClient(client EngineClient)
- func (s *Service) SetEventReportConfigApplier(applier EventReportConfigApplier)
- func (s *Service) SetExecutionService(service *executionapp.Service)
- func (s *Service) SetExecutionTargetResolver(resolver ExecutionTargetResolver)
- func (s *Service) SetJobIDGenerator(generator *JobIDGenerator)
- func (s *Service) SetRuntimeResolver(resolver ClusterRuntimeResolver)
- func (s *Service) SetTaskAlertPolicyStore(store syncalert.TaskPolicyStore)
- func (s *Service) StartEngineEventRuntime(ctx context.Context)
- func (s *Service) StartJobObservabilityCollector(ctx context.Context)
- func (s *Service) StartJobReconciler(ctx context.Context)
- func (s *Service) StartPreviewRuntime(ctx context.Context)
- func (s *Service) StartTaskScheduleRuntime(ctx context.Context)
- func (s *Service) SubmitTask(ctx context.Context, id uint, createdBy uint, draft *TaskDraftPayload) (*JobInstance, error)
- func (s *Service) SubmitTaskForActor(ctx context.Context, actor executionapp.Actor, id uint, ...) (*JobInstance, error)
- func (s *Service) SubmitTaskForActorWithOptions(ctx context.Context, actor executionapp.Actor, id uint, opts *SubmitOptions, ...) (*JobInstance, error)
- func (s *Service) SubmitTaskWithExecution(ctx context.Context, id, createdBy uint, draft *TaskDraftPayload, ...) (*JobInstance, error)
- func (s *Service) SubmitTaskWithExecutionOptions(ctx context.Context, id, createdBy uint, opts *SubmitOptions, ...) (*JobInstance, error)
- func (s *Service) SubmitTaskWithOptions(ctx context.Context, id uint, createdBy uint, opts *SubmitOptions) (*JobInstance, error)
- func (s *Service) TestTaskConnections(ctx context.Context, id uint, draft *TaskDraftPayload) (*ValidateResult, error)
- func (s *Service) TestTaskConnectionsForActor(ctx context.Context, actor executionapp.Actor, id uint, ...) (*ValidateResult, error)
- func (s *Service) UnbindDolphin(ctx context.Context, actor executionapp.Actor, taskID uint) error
- func (s *Service) UpdateCuratedTemplate(ctx context.Context, id uint, req *UpdateCuratedTemplateRequest, userID uint) (*CuratedTemplateView, error)
- func (s *Service) UpdateEventChannelForActor(ctx context.Context, actor executionapp.Actor, clusterID uint, ...) (*EventChannelStatus, error)
- func (s *Service) UpdateGlobalVariable(ctx context.Context, id uint, req *UpdateGlobalVariableRequest) (*GlobalVariable, error)
- func (s *Service) UpdateGlobalVariableForActor(ctx context.Context, actor executionapp.Actor, id uint, ...) (*GlobalVariable, error)
- func (s *Service) UpdateSchedulerConnection(ctx context.Context, id uint, req *SchedulerConnectionRequest) (*SchedulerConnection, error)
- func (s *Service) UpdateTask(ctx context.Context, id uint, req *UpdateTaskRequest) (*Task, error)
- func (s *Service) UpdateTaskAlertForActor(ctx context.Context, actor executionapp.Actor, taskID uint, ...) (*syncalert.TaskConfig, error)
- func (s *Service) UpdateTaskForActor(ctx context.Context, actor executionapp.Actor, id uint, req *UpdateTaskRequest) (*Task, error)
- func (s *Service) UpdateTaskPermissionsForActor(ctx context.Context, actor executionapp.Actor, id uint, ...) (*TaskPermissions, *TaskPermissions, error)
- func (s *Service) ValidateTask(ctx context.Context, id uint, draft *TaskDraftPayload) (*ValidateResult, error)
- func (s *Service) ValidateTaskForActor(ctx context.Context, actor executionapp.Actor, id uint, ...) (*ValidateResult, error)
- type SinkSaveModePreviewResponse
- type SubmitOptions
- type SyncPluginEnumCatalogPlugin
- type SyncPluginEnumCatalogResult
- type SyncPluginEnumValuesResult
- type SyncPluginFactoryInfo
- type SyncPluginFactoryListResult
- type SyncPluginOptionDescriptor
- type SyncPluginOptionSchemaResult
- type SyncPluginTemplateResult
- type SyncPluginType
- type SyncSinkSaveModePreviewAction
- type SyncSinkSaveModePreviewResult
- type SyncSinkSaveModePreviewTable
- type Task
- func (t *Task) CanUserEdit(userID uint, isAdmin bool) bool
- func (t *Task) CanUserRun(userID uint, isAdmin bool) bool
- func (t *Task) CanUserView(userID uint, isAdmin bool) bool
- func (t *Task) CollaboratorIDs() []uint
- func (t *Task) DecoratePermissions(userID uint, isAdmin bool)
- func (t *Task) HasCollaborator(userID uint) bool
- func (t *Task) IsPublic() bool
- func (Task) TableName() string
- type TaskActionRequest
- type TaskAlertRequest
- type TaskAlertResponse
- type TaskDraftPayload
- type TaskFilter
- type TaskListData
- type TaskListResponse
- type TaskMode
- type TaskNodeType
- type TaskPermissions
- type TaskPermissionsResponse
- type TaskResponse
- type TaskSchedulerBinding
- type TaskStatus
- type TaskTimeoutDefaults
- type TaskTreeData
- type TaskTreeNode
- type TaskTreeResponse
- type TaskVersion
- type TaskVersionListData
- type TaskVersionListResponse
- type TaskVersionResponse
- type UpdateCuratedTemplateRequest
- type UpdateEventChannelRequest
- type UpdateGlobalVariableRequest
- type UpdateTaskPermissionsRequest
- type UpdateTaskRequest
- type ValidateCheck
- type ValidateResponse
- type ValidateResult
Constants ¶
const ( EngineEventTypeJobStatus = "JOB_STATUS" EngineEventTypeMessageDelayed = "READER_MESSAGE_DELAYED" EngineEventTypeStainTrace = "STAIN_TRACE" EventChannelStateDisabled = "disabled" EventChannelStatePendingRestart = "pending_restart" EventChannelStateHealthy = "healthy" EventChannelStateDegraded = "degraded" )
事件类型与通道状态常量。 Event type and channel state constants.
const ( // GlobalVariableTypeString represents a plain text variable. // GlobalVariableTypeString 表示普通文本变量。 GlobalVariableTypeString = "string" // GlobalVariableTypeSecret represents a password/secret variable that is never displayed after creation. // GlobalVariableTypeSecret 表示密码/机密变量,创建或更新后不回显明文。 GlobalVariableTypeSecret = "secret" )
const ( CuratedSectionEnv = "env" CuratedSectionSource = "source" CuratedSectionTransform = "transform" CuratedSectionSink = "sink" CuratedSectionCombo = "combo" CuratedOriginBuiltin = "builtin" CuratedOriginUser = "user" CuratedOriginOverride = "override" CuratedModeBatch = "BATCH" CuratedModeStreaming = "STREAMING" CuratedModeAny = "ANY" )
Curated template section / origin constants. 精选模板分区与来源常量。
const ( // ObservabilityModeAuto 表示流式作业开启、批作业关闭。 // ObservabilityModeAuto enables observability for streaming jobs and disables it for batch jobs. ObservabilityModeAuto = "auto" // ObservabilityModeOn 表示无论作业模式都开启。 // ObservabilityModeOn always enables observability. ObservabilityModeOn = "on" // ObservabilityModeOff 表示不注入。 // ObservabilityModeOff never injects observability. ObservabilityModeOff = "off" )
const ( PlanDAGReasonNoSubmittedContent = "no_submitted_content" PlanDAGReasonLocalMode = "local_mode" PlanDAGReasonInspectFailed = "inspect_failed" )
计划 DAG 不可用原因,前端按 reason 本地化说明;都以 200 + available=false 返回,不作为错误。 Plan DAG unavailability reasons, localized by the frontend; all are returned as 200 + available=false, not errors.
const ( RealtimeReasonVersionUnsupported = "version_unsupported" RealtimeReasonNotClusterMode = "not_cluster_mode" RealtimeReasonNotRunning = "not_running" RealtimeReasonNotEnabled = "not_enabled" RealtimeReasonMasterUnreachable = "master_unreachable" RealtimeReasonNoEngineJob = "no_engine_job" RealtimeReasonCollecting = "collecting" RealtimeReasonClientUnsupported = "client_unsupported" )
实时数据不可用的稳定原因码,前端负责本地化。 Stable reason codes for unavailable realtime data; the frontend localizes them.
const ( RealtimeHintSinkSlow = "sink_slow" RealtimeHintTransformBusy = "transform_busy" RealtimeHintDownstreamBackpressure = "downstream_backpressure" RealtimeHintSourceIdle = "source_idle" RealtimeHintSourceBusy = "source_busy" )
瓶颈提示码与阈值,规则来自上游 busyness-and-backpressure 文档的判定表。 Bottleneck hint codes and thresholds derived from the upstream busyness-and-backpressure decision table.
const ( SchedulerKindDolphin = "dolphin" SchedulerAPIStyleAuto = "auto" SchedulerAPIStyleProcess = "process" SchedulerAPIStyleWorkflow = "workflow" )
const ( // EngineEventIngestMaxBytes 限制单次上报请求体;引擎每批最多 1000 条事件。 // EngineEventIngestMaxBytes bounds one report body; the engine sends at most 1000 events per batch. EngineEventIngestMaxBytes = 4 << 20 )
Variables ¶
var ( // ErrEngineNotMaster 表示请求的节点不是 active master(引擎返回 404 "Not a master node")。 // ErrEngineNotMaster means the node is not the active master (engine answered 404 "Not a master node"). ErrEngineNotMaster = errors.New("sync: engine node is not the active master") // ErrEngineRealtimeDisabled 表示引擎的实时指标服务未启动(引擎返回 503)。 // ErrEngineRealtimeDisabled means the engine realtime metrics service is not running (engine answered 503). ErrEngineRealtimeDisabled = errors.New("sync: engine realtime metrics service is unavailable") )
var ( ErrTaskNotFound = errors.New("sync: task not found") ErrTaskVersionNotFound = errors.New("sync: task version not found") ErrJobInstanceNotFound = errors.New("sync: job instance not found") ErrTaskNameRequired = errors.New("sync: task name is required") ErrInvalidTaskMode = errors.New("sync: invalid task mode") ErrInvalidTaskStatus = errors.New("sync: invalid task status") ErrInvalidRunType = errors.New("sync: invalid run type") ErrTaskArchived = errors.New("sync: archived task cannot be modified") ErrTaskNotPublished = errors.New("sync: task has not been published") ErrTaskDefinitionEmpty = errors.New("sync: task definition content is required") ErrInvalidPreviewMode = errors.New("sync: invalid preview mode") ErrPreviewHTTPSinkEmpty = errors.New("sync: preview http sink configuration is required") ErrJobAlreadyFinished = errors.New("sync: job instance already finished") ErrJobPermissionDenied = errors.New("sync: job instance permission denied") ErrJobStatusChanged = errors.New("sync: job instance status changed concurrently") ErrInvalidNodeType = errors.New("sync: invalid node type") ErrParentTaskNotFolder = errors.New("sync: parent node must be a folder") ErrFolderContentUnsupported = errors.New("sync: folder node does not support job content") ErrTaskNotFile = errors.New("sync: operation only supports file nodes") ErrInvalidContentFormat = errors.New("sync: invalid content format") ErrRecoverSourceRequired = errors.New("sync: recover source job instance is required") ErrTaskNameInvalid = errors.New("sync: task name contains unsupported characters") ErrTaskParentCycle = errors.New("sync: parent node cannot be current node or its descendant") ErrRootFileNotAllowed = errors.New("sync: files must be created inside a folder") ErrTaskNameDuplicate = errors.New("sync: task name already exists in the current folder") ErrLocalClusterRequired = errors.New("sync: local execution requires a cluster context") ErrLocalSavepointUnsupported = errors.New("sync: local execution does not support savepoint") ErrExecutionTargetClusterMismatch = errors.New("sync: execution target does not belong to task cluster") ErrPreviewPayloadInvalid = errors.New("sync: preview collect payload is invalid") ErrGlobalVariableNotFound = errors.New("sync: global variable not found") ErrGlobalVariableKeyRequired = errors.New("sync: global variable key is required") ErrGlobalVariableKeyInvalid = errors.New("sync: global variable key contains unsupported characters") ErrGlobalVariableKeyDuplicate = errors.New("sync: global variable key already exists") ErrReservedBuiltinVariableKey = errors.New("sync: variable key is reserved for built-in time variables") ErrPreviewSessionNotFound = errors.New("sync: preview session not found") ErrInvalidTaskSchedule = errors.New("sync: invalid task schedule") ErrMaskedSecretCannotBeRestored = errors.New("sync: masked secret cannot be restored from the saved task") ErrTaskReadOnly = errors.New("sync: task is read-only for current user") ErrTaskPermissionDenied = errors.New("sync: task permission denied") ErrInvalidTaskCollaborator = errors.New("sync: collaborator user id must be greater than zero") ErrGlobalVariablePermissionDenied = errors.New("sync: global variable permission denied") ErrCuratedTemplateNotFound = errors.New("sync: curated template not found") ErrCuratedTemplateNameRequired = errors.New("sync: curated template name is required") ErrCuratedTemplateContentRequired = errors.New("sync: curated template content is required") ErrCuratedTemplateSectionInvalid = errors.New("sync: curated template section is invalid") ErrCuratedTemplateBuiltinReadonly = errors.New("sync: built-in curated template is read-only") ErrCuratedTemplatePermissionDenied = errors.New("sync: curated template permission denied") ErrCuratedBuiltinIDRequired = errors.New("sync: curated builtin_id is required") ErrUnreplacedVariable = errors.New("sync: variable value still contains an unreplaced ${...} placeholder") ErrInvalidScheduleTime = errors.New("sync: schedule_time must be RFC3339 or yyyyMMddHHmmss") ErrAttachGenerationMismatch = errors.New("sync: attach_generation does not match the current job") ErrJobCancellingTimeout = errors.New("sync: timed out waiting for the previous job on this external_ref to finish cancelling") ErrScheduleLockedByDolphin = errors.New("sync: built-in schedule cannot be enabled while the task is bound to DolphinScheduler") ErrSchedulerConnectionNotFound = errors.New("sync: scheduler connection not found") ErrSchedulerConnectionInvalid = errors.New("sync: scheduler connection is invalid") ErrSchedulerBindingNotFound = errors.New("sync: scheduler binding not found") ErrSchedulerBindingExists = errors.New("sync: task already has a scheduler binding") ErrDolphinCycle = errors.New("sync: adding the selected upstream/downstream edges would create a cycle") ErrDolphinVersionConflict = errors.New("sync: DolphinScheduler workflow version changed") ErrDolphinNodeMissing = errors.New("sync: bound DolphinScheduler task node is missing; use first-time push") ErrDolphinPushInvalid = errors.New("sync: invalid DolphinScheduler push request") ErrDolphinPushNoNewVersion = errors.New("sync: dolphin push requires a new published version") ErrDolphinUnsupportedVersion = errors.New("sync: only DolphinScheduler 3.x is supported") // 事件通道错误 / Event channel errors. ErrEventChannelNotFound = errors.New("sync: engine event channel not found") ErrEventChannelVersionUnsupported = errors.New("sync: engine event reporting requires SeaTunnel 2.3.12 or later") ErrEventChannelExternalURLMissing = errors.New("sync: app.external_url must be configured so SeaTunnel can reach STX") ErrEventChannelSecretMissing = errors.New("sync: app.session_secret must be configured to sign engine event tokens") ErrEventChannelApplierMissing = errors.New("sync: seatunnel.yaml config applier is not configured") ErrEventChannelPermissionDenied = errors.New("sync: only administrators can change the engine event channel") )
var ( // ErrSubmitOutcomePending 表示同一任务上一次提交结果还在确认中,确认前拒绝新的提交。 // ErrSubmitOutcomePending means the task's previous submit is still being confirmed, so new submits are refused. ErrSubmitOutcomePending = errors.New("sync: previous submit outcome is still being confirmed") // ErrInvalidTaskTimeout 表示任务设置里的提交/停止超时不在允许范围内。 // ErrInvalidTaskTimeout means a task's submit/stop timeout override is outside the allowed range. ErrInvalidTaskTimeout = errors.New("sync: task timeout override must be between 1 and 120 minutes") )
写操作结果未知与超时配置相关错误。 Errors for unknown write outcomes and timeout settings.
ErrClusterEngineUnavailable 无法解析集群引擎地址或未配置引擎客户端,运行中作业未知。 ErrClusterEngineUnavailable means the cluster engine endpoint cannot be resolved or no engine client is configured, so running jobs are unknown.
var ErrEngineCallOutcomeUnknown = errors.New("sync: engine call outcome unknown")
ErrEngineCallOutcomeUnknown 表示写操作(提交/停止)可能已到达引擎但没有拿到回复。 ErrEngineCallOutcomeUnknown means a write call (submit/stop) may have reached the engine but no reply was received.
var ( // ErrTaskAlertUnavailable means the alert module is not initialized, so task alert config is unavailable. ErrTaskAlertUnavailable = errors.New("sync: job alerts are unavailable because the monitoring module is not initialized") )
作业告警配置相关错误。 Errors for job alert configuration.
Functions ¶
func FormatJobMetricsLogBlock ¶ added in v1.2.0
FormatJobMetricsLogBlock 将 SeaTunnel / STX 已存 metrics 格式化为可读日志块(双语标签)。 FormatJobMetricsLogBlock formats stored SeaTunnel/STX metrics into a readable log block (bilingual labels).
func JobPrometheusMetricsPath ¶ added in v1.3.0
func JobPrometheusMetricsPath() string
JobPrometheusMetricsPath 返回作业指标抓取路径。 JobPrometheusMetricsPath returns the scrape path for job metrics.
func ServeJobPrometheusMetrics ¶ added in v1.3.0
func ServeJobPrometheusMetrics(w http.ResponseWriter, r *http.Request)
ServeJobPrometheusMetrics 写出 Prometheus exposition;STX observability 关闭时返回 503。 ServeJobPrometheusMetrics writes the Prometheus exposition; returns 503 when STX observability is off.
Types ¶
type AgentCommandSender ¶
type BasicResponse ¶
type BasicResponse struct {
ErrorMsg string `json:"error_msg"`
Data interface{} `json:"data"`
}
type CancelByRefRequest ¶ added in v1.2.0
type CancelByRefRequest struct {
ExternalRef string `json:"external_ref"`
AttachGeneration int `json:"attach_generation"`
}
CancelByRefRequest 按外部引用停止作业。 CancelByRefRequest stops a job by its external scheduler reference.
type CancelJobRequest ¶
type CancelJobRequest struct {
StopWithSavepoint bool `json:"stop_with_savepoint"`
}
CancelJobRequest represents stop-job behavior.
type CheckpointSnapshot ¶
type CheckpointSnapshot struct {
JobInstanceID uint `json:"job_instance_id"`
PlatformJobID string `json:"platform_job_id"`
EngineJobID string `json:"engine_job_id"`
Status string `json:"status"`
EmptyReason string `json:"empty_reason,omitempty"`
Message string `json:"message,omitempty"`
Overview *EngineCheckpointOverview `json:"overview,omitempty"`
History []*EngineCheckpointRecord `json:"history,omitempty"`
}
CheckpointSnapshot represents checkpoint overview and history for one job. CheckpointSnapshot 表示单个作业的 checkpoint 概览与历史。
type CheckpointSnapshotResponse ¶
type CheckpointSnapshotResponse struct {
ErrorMsg string `json:"error_msg"`
Data *CheckpointSnapshot `json:"data"`
}
type ClusterEngineEndpointLister ¶ added in v1.3.0
type ClusterEngineEndpointLister interface {
ListEngineEndpoints(ctx context.Context, clusterID uint, taskDefinition JSONMap) ([]*EngineEndpoint, error)
}
ClusterEngineEndpointLister 是可选能力:列出集群全部在线节点的引擎地址,供只能访问 active master 的接口(/metrics/realtime)逐个探测。 ClusterEngineEndpointLister is an optional capability listing every online node endpoint so master-only APIs (such as /metrics/realtime) can probe them one by one.
type ClusterLogProvider ¶
type ClusterRuntimeResolver ¶
type ClusterRuntimeResolver interface {
ResolveEngineEndpoint(ctx context.Context, clusterID uint, taskDefinition JSONMap) (*EngineEndpoint, error)
}
ClusterRuntimeResolver resolves SeaTunnel engine API endpoints from cluster metadata.
type ClusterVersionProvider ¶
type ClusterVersionProvider interface {
GetClusterVersion(ctx context.Context, clusterID uint) (string, error)
}
ClusterVersionProvider provides SeaTunnel cluster version lookup.
type ConfigToolClient ¶
type ConfigToolClient interface {
InspectDAG(ctx context.Context, endpoint string, req *ConfigToolContentRequest) (*ConfigToolDAGResponse, error)
InspectWebUIDAG(ctx context.Context, endpoint string, req *ConfigToolContentRequest) (*ConfigToolWebUIDAGResponse, error)
ValidateConfig(ctx context.Context, endpoint string, req *ConfigToolValidateRequest) (*ConfigToolValidateResponse, error)
DeriveSourcePreview(ctx context.Context, endpoint string, req *ConfigToolPreviewRequest) (*ConfigToolPreviewResponse, error)
DeriveTransformPreview(ctx context.Context, endpoint string, req *ConfigToolPreviewRequest) (*ConfigToolPreviewResponse, error)
ListPlugins(ctx context.Context, endpoint string, req *ConfigToolPluginListRequest) (*ConfigToolPluginListResponse, error)
GetPluginOptions(ctx context.Context, endpoint string, req *ConfigToolPluginOptionsRequest) (*ConfigToolPluginOptionsResponse, error)
RenderPluginTemplate(ctx context.Context, endpoint string, req *ConfigToolPluginTemplateRequest) (*ConfigToolPluginTemplateResponse, error)
ListPluginEnumValues(ctx context.Context, endpoint string, req *ConfigToolPluginEnumValuesRequest) (*ConfigToolPluginEnumValuesResponse, error)
PreviewSinkSaveMode(ctx context.Context, endpoint string, req *ConfigToolSinkSaveModePreviewRequest) (*ConfigToolSinkSaveModePreviewResponse, error)
}
ConfigToolClient talks to stx-java-proxy config APIs.
type ConfigToolContentRequest ¶
type ConfigToolContentRequest struct {
Content string `json:"content,omitempty"`
ContentFormat string `json:"contentFormat,omitempty"`
FilePath string `json:"filePath,omitempty"`
Variables []string `json:"variables,omitempty"`
}
ConfigToolContentRequest represents shared content/filePath input.
type ConfigToolDAGResponse ¶
type ConfigToolDAGResponse struct {
OK bool `json:"ok"`
Message string `json:"message,omitempty"`
SimpleGraph bool `json:"simpleGraph"`
SourceCount int `json:"sourceCount"`
TransformCount int `json:"transformCount"`
SinkCount int `json:"sinkCount"`
Warnings []string `json:"warnings"`
Graph ConfigToolGraph `json:"graph"`
}
ConfigToolDAGResponse mirrors java-proxy dag response.
type ConfigToolError ¶
type ConfigToolError struct {
StatusCode int
Path string
Message string
RawBody string
ErrorType string
}
ConfigToolError captures structured proxy request failures.
func (*ConfigToolError) Error ¶
func (e *ConfigToolError) Error() string
type ConfigToolGraph ¶
type ConfigToolGraph struct {
Nodes []map[string]interface{} `json:"nodes"`
Edges []map[string]interface{} `json:"edges"`
}
ConfigToolGraph mirrors java-proxy DAG payload.
type ConfigToolPluginEnumValuesRequest ¶
type ConfigToolPluginEnumValuesRequest struct {
PluginType string `json:"pluginType"`
FactoryIdentifier string `json:"factoryIdentifier"`
OptionKey string `json:"optionKey"`
PluginJars []string `json:"pluginJars,omitempty"`
IncludeSupplement bool `json:"includeSupplement"`
}
ConfigToolPluginEnumValuesRequest represents plugin enum values input.
type ConfigToolPluginEnumValuesResponse ¶
type ConfigToolPluginEnumValuesResponse struct {
OK bool `json:"ok"`
PluginType string `json:"pluginType"`
FactoryIdentifier string `json:"factoryIdentifier"`
OptionKey string `json:"optionKey"`
EnumValues []string `json:"enumValues"`
Warnings []string `json:"warnings"`
}
ConfigToolPluginEnumValuesResponse mirrors java-proxy enum values response.
type ConfigToolPluginFactoryInfo ¶
type ConfigToolPluginFactoryInfo struct {
FactoryIdentifier string `json:"factoryIdentifier"`
ClassName string `json:"className,omitempty"`
Origin string `json:"origin,omitempty"`
}
ConfigToolPluginFactoryInfo mirrors java-proxy plugin list entry.
type ConfigToolPluginListRequest ¶
type ConfigToolPluginListRequest struct {
PluginType string `json:"pluginType"`
PluginJars []string `json:"pluginJars,omitempty"`
}
ConfigToolPluginListRequest represents plugin discovery input.
type ConfigToolPluginListResponse ¶
type ConfigToolPluginListResponse struct {
OK bool `json:"ok"`
PluginType string `json:"pluginType"`
Plugins []ConfigToolPluginFactoryInfo `json:"plugins"`
Warnings []string `json:"warnings"`
}
ConfigToolPluginListResponse mirrors java-proxy plugin list response.
type ConfigToolPluginOptionDescriptor ¶
type ConfigToolPluginOptionDescriptor struct {
Key string `json:"key"`
Type string `json:"type,omitempty"`
ElementType string `json:"elementType,omitempty"`
DefaultValue interface{} `json:"defaultValue,omitempty"`
Description string `json:"description,omitempty"`
FallbackKeys []string `json:"fallbackKeys,omitempty"`
EnumValues []string `json:"enumValues,omitempty"`
EnumDisplayValues []string `json:"enumDisplayValues,omitempty"`
RequiredMode string `json:"requiredMode,omitempty"`
ConditionExpression string `json:"conditionExpression,omitempty"`
ConstraintGroup string `json:"constraintGroup,omitempty"`
Origins []string `json:"origins,omitempty"`
DeclaredClasses []string `json:"declaredClasses,omitempty"`
Advanced bool `json:"advanced"`
}
ConfigToolPluginOptionDescriptor mirrors java-proxy plugin option descriptor.
type ConfigToolPluginOptionsRequest ¶
type ConfigToolPluginOptionsRequest struct {
PluginType string `json:"pluginType"`
FactoryIdentifier string `json:"factoryIdentifier"`
PluginJars []string `json:"pluginJars,omitempty"`
IncludeSupplement bool `json:"includeSupplement"`
}
ConfigToolPluginOptionsRequest represents plugin schema inspection input.
type ConfigToolPluginOptionsResponse ¶
type ConfigToolPluginOptionsResponse struct {
OK bool `json:"ok"`
PluginType string `json:"pluginType"`
FactoryIdentifier string `json:"factoryIdentifier"`
Options []ConfigToolPluginOptionDescriptor `json:"options"`
ValueConstraints []map[string]interface{} `json:"valueConstraints,omitempty"`
ConditionRules []map[string]interface{} `json:"conditionRules,omitempty"`
Warnings []string `json:"warnings"`
}
ConfigToolPluginOptionsResponse mirrors java-proxy plugin options response.
type ConfigToolPluginTemplateRequest ¶
type ConfigToolPluginTemplateRequest struct {
PluginType string `json:"pluginType"`
FactoryIdentifier string `json:"factoryIdentifier"`
PluginJars []string `json:"pluginJars,omitempty"`
IncludeSupplement bool `json:"includeSupplement"`
IncludeComments bool `json:"includeComments"`
IncludeAdvanced bool `json:"includeAdvanced"`
}
ConfigToolPluginTemplateRequest represents plugin template rendering input.
type ConfigToolPluginTemplateResponse ¶
type ConfigToolPluginTemplateResponse struct {
OK bool `json:"ok"`
PluginType string `json:"pluginType"`
FactoryIdentifier string `json:"factoryIdentifier"`
ContentFormat string `json:"contentFormat"`
Template string `json:"template"`
Warnings []string `json:"warnings"`
}
ConfigToolPluginTemplateResponse mirrors java-proxy template response.
type ConfigToolPreviewRequest ¶
type ConfigToolPreviewRequest struct {
ConfigToolContentRequest
SourceNodeID string `json:"sourceNodeId,omitempty"`
SourceIndex *int `json:"sourceIndex,omitempty"`
TransformNodeID string `json:"transformNodeId,omitempty"`
TransformIndex *int `json:"transformIndex,omitempty"`
PlatformJobID string `json:"platformJobId,omitempty"`
EngineJobID string `json:"engineJobId,omitempty"`
PreviewRowLimit *int `json:"previewRowLimit,omitempty"`
OutputFormat string `json:"outputFormat,omitempty"`
MetadataOutputDataset string `json:"metadataOutputDataset,omitempty"`
MetadataFields map[string]interface{} `json:"metadataFields,omitempty"`
EnvOverrides map[string]interface{} `json:"envOverrides,omitempty"`
HttpSink map[string]interface{} `json:"httpSink,omitempty"`
}
ConfigToolPreviewRequest represents preview derive request.
type ConfigToolPreviewResponse ¶
type ConfigToolPreviewResponse struct {
OK bool `json:"ok"`
Message string `json:"message,omitempty"`
Mode string `json:"mode,omitempty"`
SelectedNodeID string `json:"selectedNodeId,omitempty"`
SelectedIndex int `json:"selectedIndex,omitempty"`
Warnings []string `json:"warnings"`
Content string `json:"content,omitempty"`
ContentFormat string `json:"contentFormat,omitempty"`
Config map[string]interface{} `json:"config,omitempty"`
Graph ConfigToolGraph `json:"graph"`
SimpleGraph bool `json:"simpleGraph"`
}
ConfigToolPreviewResponse mirrors java-proxy preview response.
type ConfigToolResolver ¶
type ConfigToolResolver interface {
ResolveConfigToolEndpoint(ctx context.Context, clusterID uint, taskDefinition JSONMap) (string, error)
}
ConfigToolResolver resolves java-proxy endpoint for a sync task.
type ConfigToolSinkSaveModePreviewAction ¶
type ConfigToolSinkSaveModePreviewAction struct {
Phase string `json:"phase,omitempty"`
ActionType string `json:"actionType,omitempty"`
ResultType string `json:"resultType,omitempty"`
Content string `json:"content,omitempty"`
Native bool `json:"native"`
}
ConfigToolSinkSaveModePreviewAction mirrors one java-proxy save mode preview action.
type ConfigToolSinkSaveModePreviewRequest ¶
type ConfigToolSinkSaveModePreviewRequest struct {
ConfigToolContentRequest
SinkIndex *int `json:"sinkIndex,omitempty"`
SinkNodeID string `json:"sinkNodeId,omitempty"`
PluginJars []string `json:"pluginJars,omitempty"`
IncludeInfoPreview bool `json:"includeInfoPreview"`
}
ConfigToolSinkSaveModePreviewRequest represents sink save mode preview input.
type ConfigToolSinkSaveModePreviewResponse ¶
type ConfigToolSinkSaveModePreviewResponse struct {
OK bool `json:"ok"`
Connector string `json:"connector,omitempty"`
SinkIndex int `json:"sinkIndex,omitempty"`
Supported bool `json:"supported"`
Completeness string `json:"completeness,omitempty"`
SchemaSaveMode string `json:"schemaSaveMode,omitempty"`
DataSaveMode string `json:"dataSaveMode,omitempty"`
TablePath string `json:"tablePath,omitempty"`
Actions []ConfigToolSinkSaveModePreviewAction `json:"actions,omitempty"`
Tables []ConfigToolSinkSaveModePreviewTable `json:"tables,omitempty"`
Warnings []string `json:"warnings,omitempty"`
}
ConfigToolSinkSaveModePreviewResponse mirrors java-proxy save mode preview response.
type ConfigToolSinkSaveModePreviewTable ¶
type ConfigToolSinkSaveModePreviewTable struct {
TablePath string `json:"tablePath,omitempty"`
Supported bool `json:"supported"`
Completeness string `json:"completeness,omitempty"`
SchemaSaveMode string `json:"schemaSaveMode,omitempty"`
DataSaveMode string `json:"dataSaveMode,omitempty"`
Actions []ConfigToolSinkSaveModePreviewAction `json:"actions,omitempty"`
Warnings []string `json:"warnings,omitempty"`
}
ConfigToolSinkSaveModePreviewTable mirrors per-table preview details.
type ConfigToolValidateRequest ¶
type ConfigToolValidateRequest struct {
ConfigToolContentRequest
TestConnection bool `json:"testConnection"`
}
ConfigToolValidateRequest represents config validation / connection test input.
type ConfigToolValidateResponse ¶
type ConfigToolValidateResponse struct {
OK bool `json:"ok"`
Valid bool `json:"valid"`
Summary string `json:"summary"`
Errors []string `json:"errors"`
Warnings []string `json:"warnings"`
Checks []ConfigToolValidationCheck `json:"checks"`
}
ConfigToolValidateResponse mirrors java-proxy config validation response.
type ConfigToolValidationCheck ¶
type ConfigToolValidationCheck struct {
NodeID string `json:"nodeId"`
Kind string `json:"kind"`
ConnectorType string `json:"connectorType"`
Target string `json:"target"`
ProbeMethod string `json:"probeMethod,omitempty"`
Status string `json:"status"`
Message string `json:"message"`
}
ConfigToolValidationCheck 表示 java-proxy 返回的单个连接器探测条目。 ConfigToolValidationCheck represents one connector validation result from java-proxy.
type ConfigToolWebUIDAGEdge ¶
type ConfigToolWebUIDAGEdge struct {
InputVertexID int `json:"inputVertexId"`
TargetVertexID int `json:"targetVertexId"`
}
ConfigToolWebUIDAGEdge mirrors webui edge payload from java-proxy.
type ConfigToolWebUIDAGResponse ¶
type ConfigToolWebUIDAGResponse struct {
JobID string `json:"jobId"`
JobName string `json:"jobName"`
JobStatus string `json:"jobStatus"`
ErrorMsg string `json:"errorMsg"`
CreateTime string `json:"createTime"`
FinishTime string `json:"finishTime"`
JobDag ConfigToolWebUIJobDAG `json:"jobDag"`
Metrics map[string]interface{} `json:"metrics"`
PluginJarsUrls []string `json:"pluginJarsUrls"`
SimpleGraph bool `json:"simpleGraph"`
Warnings []string `json:"warnings"`
}
ConfigToolWebUIDAGResponse mirrors java-proxy webui dag preview response.
type ConfigToolWebUIDAGVertexInfo ¶
type ConfigToolWebUIDAGVertexInfo struct {
VertexID int `json:"vertexId"`
Type string `json:"type"`
ConnectorType string `json:"connectorType"`
TablePaths []string `json:"tablePaths"`
TableColumns map[string][]string `json:"tableColumns"`
TableSchemas map[string]map[string]interface{} `json:"tableSchemas"`
SaveModePreviews map[string]ConfigToolSinkSaveModePreviewTable `json:"saveModePreviews,omitempty"`
SaveModeWarnings []string `json:"saveModeWarnings,omitempty"`
}
ConfigToolWebUIDAGVertexInfo mirrors webui vertex payload from java-proxy.
type ConfigToolWebUIJobDAG ¶
type ConfigToolWebUIJobDAG struct {
JobID string `json:"jobId"`
PipelineEdges map[string][]ConfigToolWebUIDAGEdge `json:"pipelineEdges"`
VertexInfoMap map[string]ConfigToolWebUIDAGVertexInfo `json:"vertexInfoMap"`
EnvOptions map[string]interface{} `json:"envOptions"`
}
ConfigToolWebUIJobDAG mirrors webui compatible jobDag payload.
type ContentFormat ¶
type ContentFormat string
ContentFormat represents the editor content format. ContentFormat 表示编辑器内容格式。
const ( ContentFormatHOCON ContentFormat = "hocon" ContentFormatJSON ContentFormat = "json" )
type CreateCuratedTemplateRequest ¶ added in v1.0.0
type CreateCuratedTemplateRequest struct {
Name string `json:"name" binding:"required"`
Description string `json:"description"`
Section string `json:"section"`
Mode string `json:"mode"`
Pattern string `json:"pattern"`
Connectors []string `json:"connectors"`
Content string `json:"content" binding:"required"`
BuiltinID string `json:"builtin_id"`
}
CreateCuratedTemplateRequest creates one user curated template. CreateCuratedTemplateRequest 创建一条用户精选模板。
type CreateGlobalVariableRequest ¶
type CreateGlobalVariableRequest struct {
Key string `json:"key" binding:"required"`
Value string `json:"value"`
ValueType string `json:"value_type"`
Description string `json:"description"`
}
CreateGlobalVariableRequest represents one global variable payload. CreateGlobalVariableRequest 表示创建全局变量请求体。
type CreateTaskRequest ¶
type CreateTaskRequest struct {
ParentID *uint `json:"parent_id"`
NodeType string `json:"node_type"`
Name string `json:"name" binding:"required"`
Description string `json:"description"`
ClusterID uint `json:"cluster_id"`
EngineVersion string `json:"engine_version"`
Mode string `json:"mode"`
ContentFormat string `json:"content_format"`
Content string `json:"content"`
JobName string `json:"job_name"`
SortOrder int `json:"sort_order"`
Definition JSONMap `json:"definition"`
}
CreateTaskRequest represents the payload for creating a sync workspace node.
type CuratedComboParseData ¶ added in v1.0.0
type CuratedComboParseData struct {
Env string `json:"env"`
Source string `json:"source"`
Transform string `json:"transform"`
Sink string `json:"sink"`
Present []string `json:"present"`
Combined string `json:"combined"`
}
CuratedComboParseData is the four-section parse result. CuratedComboParseData 是四节解析结果。
type CuratedComboParseResponse ¶ added in v1.0.0
type CuratedComboParseResponse struct {
ErrorMsg string `json:"error_msg"`
Data *CuratedComboParseData `json:"data"`
}
CuratedComboParseResponse is the HTTP parse envelope.
type CuratedTemplate ¶ added in v1.0.0
type CuratedTemplate struct {
ID uint `json:"id" gorm:"primaryKey;autoIncrement"`
BuiltinID string `json:"builtin_id" gorm:"size:120;index"`
OwnerUserID uint `json:"owner_user_id" gorm:"index;not null"`
Name string `json:"name" gorm:"size:200;not null"`
Description string `json:"description" gorm:"type:text"`
Section string `json:"section" gorm:"size:32;not null;index"`
Mode string `json:"mode" gorm:"size:32;not null;default:'ANY'"`
Pattern string `json:"pattern" gorm:"size:32;not null;default:'other'"`
Connectors JSONStringSlice `json:"connectors" gorm:"type:json"`
// Content 精选模板脚本正文;MySQL 用 MEDIUMTEXT,PG/SQLite 用 TEXT。
// Content is curated template script body; MySQL uses MEDIUMTEXT, PG/SQLite use TEXT.
Content db.ScriptText `json:"content" gorm:"not null"`
Enabled bool `json:"enabled" gorm:"not null;default:true"`
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"`
}
CuratedTemplate stores one user-owned or forked curated template row. CuratedTemplate 存储用户自建或从内置 fork 的精选模板行。
func (CuratedTemplate) TableName ¶ added in v1.0.0
func (CuratedTemplate) TableName() string
TableName returns the curated template table name. TableName 返回精选模板表名。
type CuratedTemplateListData ¶ added in v1.0.0
type CuratedTemplateListData struct {
Items []*CuratedTemplateView `json:"items"`
Total int `json:"total"`
}
CuratedTemplateListData wraps list payload. CuratedTemplateListData 包装列表载荷。
type CuratedTemplateListResponse ¶ added in v1.0.0
type CuratedTemplateListResponse struct {
ErrorMsg string `json:"error_msg"`
Data *CuratedTemplateListData `json:"data"`
}
CuratedTemplateListResponse is the HTTP list envelope.
type CuratedTemplateResponse ¶ added in v1.0.0
type CuratedTemplateResponse struct {
ErrorMsg string `json:"error_msg"`
Data *CuratedTemplateView `json:"data"`
}
CuratedTemplateResponse is the HTTP item envelope.
type CuratedTemplateView ¶ added in v1.0.0
type CuratedTemplateView struct {
ID uint `json:"id,omitempty"`
BuiltinID string `json:"builtin_id,omitempty"`
Name string `json:"name"`
Description string `json:"description"`
Section string `json:"section"`
Mode string `json:"mode"`
Pattern string `json:"pattern"`
Connectors []string `json:"connectors"`
Content string `json:"content"`
Enabled bool `json:"enabled"`
Origin string `json:"origin"` // builtin|user|override
HasOverride bool `json:"has_override"`
OwnerUserID uint `json:"owner_user_id,omitempty"`
}
CuratedTemplateView is the API list/detail view for curated templates. CuratedTemplateView 是精选模板的列表/详情视图。
type DAGResponse ¶
type DAGResult ¶
type DAGResult struct {
Nodes []JSONMap `json:"nodes"`
Edges []JSONMap `json:"edges"`
WebUIJob JSONMap `json:"webui_job,omitempty"`
SimpleGraph bool `json:"simple_graph,omitempty"`
Warnings []string `json:"warnings,omitempty"`
}
DAGResult represents DAG response payload.
type DefaultClusterRuntimeResolver ¶
type DefaultClusterRuntimeResolver struct {
// contains filtered or unexported fields
}
DefaultClusterRuntimeResolver resolves engine endpoint via cluster and host records.
func NewDefaultClusterRuntimeResolver ¶
func NewDefaultClusterRuntimeResolver(clusterRepo *clusterapp.Repository, hostRepo *hostapp.Repository) *DefaultClusterRuntimeResolver
NewDefaultClusterRuntimeResolver creates a runtime resolver.
func (*DefaultClusterRuntimeResolver) ListEngineEndpoints ¶ added in v1.3.0
func (r *DefaultClusterRuntimeResolver) ListEngineEndpoints(ctx context.Context, clusterID uint, taskDefinition JSONMap) ([]*EngineEndpoint, error)
ListEngineEndpoints 按节点顺序返回全部在线节点的引擎地址;任务定义显式指定地址时只返回该地址。 ListEngineEndpoints returns endpoints of all online nodes in node order; an explicit task definition endpoint is returned alone.
func (*DefaultClusterRuntimeResolver) ResolveEngineEndpoint ¶
func (r *DefaultClusterRuntimeResolver) ResolveEngineEndpoint(ctx context.Context, clusterID uint, taskDefinition JSONMap) (*EngineEndpoint, error)
ResolveEngineEndpoint resolves one endpoint from cluster metadata.
type DefaultConfigToolClient ¶
type DefaultConfigToolClient struct {
// contains filtered or unexported fields
}
DefaultConfigToolClient is the default java-proxy HTTP client.
func NewDefaultConfigToolClient ¶
func NewDefaultConfigToolClient() *DefaultConfigToolClient
NewDefaultConfigToolClient creates a config tool client.
func (*DefaultConfigToolClient) DeriveSourcePreview ¶
func (c *DefaultConfigToolClient) DeriveSourcePreview(ctx context.Context, endpoint string, req *ConfigToolPreviewRequest) (*ConfigToolPreviewResponse, error)
DeriveSourcePreview calls /api/v1/config/preview/source.
func (*DefaultConfigToolClient) DeriveTransformPreview ¶
func (c *DefaultConfigToolClient) DeriveTransformPreview(ctx context.Context, endpoint string, req *ConfigToolPreviewRequest) (*ConfigToolPreviewResponse, error)
DeriveTransformPreview calls /api/v1/config/preview/transform.
func (*DefaultConfigToolClient) GetPluginOptions ¶
func (c *DefaultConfigToolClient) GetPluginOptions(ctx context.Context, endpoint string, req *ConfigToolPluginOptionsRequest) (*ConfigToolPluginOptionsResponse, error)
GetPluginOptions calls /api/v1/plugin/options.
func (*DefaultConfigToolClient) InspectDAG ¶
func (c *DefaultConfigToolClient) InspectDAG(ctx context.Context, endpoint string, req *ConfigToolContentRequest) (*ConfigToolDAGResponse, error)
InspectDAG calls /api/v1/config/dag.
func (*DefaultConfigToolClient) InspectWebUIDAG ¶
func (c *DefaultConfigToolClient) InspectWebUIDAG(ctx context.Context, endpoint string, req *ConfigToolContentRequest) (*ConfigToolWebUIDAGResponse, error)
InspectWebUIDAG calls /api/v1/config/webui-dag.
func (*DefaultConfigToolClient) ListPluginEnumValues ¶
func (c *DefaultConfigToolClient) ListPluginEnumValues(ctx context.Context, endpoint string, req *ConfigToolPluginEnumValuesRequest) (*ConfigToolPluginEnumValuesResponse, error)
ListPluginEnumValues calls /api/v1/plugin/enum-values.
func (*DefaultConfigToolClient) ListPlugins ¶
func (c *DefaultConfigToolClient) ListPlugins(ctx context.Context, endpoint string, req *ConfigToolPluginListRequest) (*ConfigToolPluginListResponse, error)
ListPlugins calls /api/v1/plugin/list.
func (*DefaultConfigToolClient) PreviewSinkSaveMode ¶
func (c *DefaultConfigToolClient) PreviewSinkSaveMode(ctx context.Context, endpoint string, req *ConfigToolSinkSaveModePreviewRequest) (*ConfigToolSinkSaveModePreviewResponse, error)
PreviewSinkSaveMode calls /api/v1/config/preview/sink-savemode.
func (*DefaultConfigToolClient) RenderPluginTemplate ¶
func (c *DefaultConfigToolClient) RenderPluginTemplate(ctx context.Context, endpoint string, req *ConfigToolPluginTemplateRequest) (*ConfigToolPluginTemplateResponse, error)
RenderPluginTemplate calls /api/v1/plugin/template.
func (*DefaultConfigToolClient) ValidateConfig ¶
func (c *DefaultConfigToolClient) ValidateConfig(ctx context.Context, endpoint string, req *ConfigToolValidateRequest) (*ConfigToolValidateResponse, error)
ValidateConfig calls /api/v1/config/validate.
type DefaultConfigToolResolver ¶
type DefaultConfigToolResolver struct {
// contains filtered or unexported fields
}
DefaultConfigToolResolver resolves java-proxy endpoint using cluster managed status or task override.
func NewDefaultConfigToolResolver ¶
func NewDefaultConfigToolResolver(clusterService *clusterapp.Service) *DefaultConfigToolResolver
NewDefaultConfigToolResolver creates a config tool resolver.
func (*DefaultConfigToolResolver) ResolveConfigToolEndpoint ¶
func (r *DefaultConfigToolResolver) ResolveConfigToolEndpoint(ctx context.Context, clusterID uint, taskDefinition JSONMap) (string, error)
ResolveConfigToolEndpoint resolves java-proxy endpoint.
type DefaultExecutionTargetResolver ¶
type DefaultExecutionTargetResolver struct {
// contains filtered or unexported fields
}
func NewDefaultExecutionTargetResolver ¶
func NewDefaultExecutionTargetResolver(clusterRepo *clusterapp.Repository, hostRepo *hostapp.Repository) *DefaultExecutionTargetResolver
func (*DefaultExecutionTargetResolver) ResolveExecutionTarget ¶
func (r *DefaultExecutionTargetResolver) ResolveExecutionTarget(ctx context.Context, clusterID uint, definition JSONMap) (*ExecutionTarget, error)
func (*DefaultExecutionTargetResolver) ResolveExecutionTargets ¶
func (r *DefaultExecutionTargetResolver) ResolveExecutionTargets(ctx context.Context, clusterID uint, definition JSONMap) ([]*ExecutionTarget, error)
type DolphinBuiltinSchedule ¶ added in v1.2.0
type DolphinBuiltinSchedule struct {
CronExpr string `json:"cron_expr"`
Timezone string `json:"timezone"`
Enabled bool `json:"enabled"`
}
DolphinBuiltinSchedule 是任务的 STX 内置定时摘要,用于推送时告知 cron 是否被沿用。 DolphinBuiltinSchedule summarizes the task's STX built-in schedule so the push dialog can tell whether the cron carries over.
type DolphinClient ¶ added in v1.2.0
type DolphinClient struct {
// contains filtered or unexported fields
}
DolphinClient 按版本切换 process-definition / workflow-definition 路径访问 Dolphin API。 DolphinClient talks to DolphinScheduler and switches process/workflow paths by version.
func (*DolphinClient) CreateDefinition ¶ added in v1.2.0
func (c *DolphinClient) CreateDefinition(ctx context.Context, projectCode int64, graph *dolphinGraph) (*dolphinGraph, error)
func (*DolphinClient) CreateSchedule ¶ added in v1.2.0
func (*DolphinClient) GenTaskCodes ¶ added in v1.2.0
func (*DolphinClient) GetDefinition ¶ added in v1.2.0
func (c *DolphinClient) GetDefinition(ctx context.Context, projectCode, workflowCode int64) (*dolphinGraph, error)
func (*DolphinClient) ListProjects ¶ added in v1.2.0
func (c *DolphinClient) ListProjects(ctx context.Context) ([]DolphinProject, error)
func (*DolphinClient) ListSchedules ¶ added in v1.2.0
func (c *DolphinClient) ListSchedules(ctx context.Context, projectCode, workflowCode int64) ([]DolphinScheduleInfo, error)
ListSchedules 列出工作流的定时及其上下线状态。成功响应但无法解析时视为没有定时(与旧行为一致);请求失败返回错误。 ListSchedules lists a workflow's schedules with their release states. A successful but unparsable response counts as no schedules (as before); a failed request returns an error.
func (*DolphinClient) ListWorkflows ¶ added in v1.2.0
func (c *DolphinClient) ListWorkflows(ctx context.Context, projectCode int64) ([]DolphinWorkflowSummary, error)
func (*DolphinClient) OnlineSchedule ¶ added in v1.2.0
func (c *DolphinClient) OnlineSchedule(ctx context.Context, projectCode, scheduleID int64) error
OnlineSchedule 上线一条定时。 OnlineSchedule brings one schedule online.
func (*DolphinClient) OnlineSchedules ¶ added in v1.2.0
func (c *DolphinClient) OnlineSchedules(ctx context.Context, projectCode, workflowCode int64) error
OnlineSchedules 上线工作流的全部定时;只用于 STX 新建的工作流(其定时都由本次推送创建)。复用 / 更新已有工作流时 必须按推送前状态恢复(见 restoreOnlineSchedules),不能调用本方法,否则会把用户暂停的定时重新打开。 OnlineSchedules brings every schedule of a workflow online; only for workflows created by STX (all their schedules come from this push). Reuse / update of an existing workflow must restore the pre-push states instead (see restoreOnlineSchedules); calling this there would re-enable schedules the user had paused.
func (*DolphinClient) ResolveEnvironmentCode ¶ added in v1.2.0
ResolveEnvironmentCode 按环境名查找 Dolphin environment code;找不到时返回 -1。 ResolveEnvironmentCode looks up a Dolphin environment code by name; missing names return -1.
func (*DolphinClient) UpdateDefinition ¶ added in v1.2.0
func (c *DolphinClient) UpdateDefinition(ctx context.Context, projectCode int64, graph *dolphinGraph) error
type DolphinProject ¶ added in v1.2.0
DolphinProject 是连接上可选的 Dolphin 项目。 DolphinProject is a Dolphin project available on a connection.
type DolphinProjectListResponse ¶ added in v1.2.0
type DolphinProjectListResponse struct {
ErrorMsg string `json:"error_msg"`
Data []DolphinProject `json:"data"`
}
type DolphinPushRequest ¶ added in v1.2.0
type DolphinPushRequest struct {
Mode string `json:"mode"`
ConnectionID uint `json:"connection_id"`
ProjectCode int64 `json:"project_code"`
WorkflowName string `json:"workflow_name"`
WorkflowCode int64 `json:"workflow_code"`
Upstreams []int64 `json:"upstreams"`
Downstreams []int64 `json:"downstreams"`
UseBuiltinSchedule bool `json:"use_builtin_schedule"`
// Timeout 已忽略:生成脚本不再写入 --timeout,保留字段只为兼容旧请求体。
// Timeout is ignored: generated scripts omit --timeout; kept only for old request bodies.
Timeout string `json:"timeout"`
Variables map[string]string `json:"variables"`
WorkerGroup string `json:"worker_group"`
Environment string `json:"environment"`
DryRun bool `json:"dry_run"`
ExpectedVersion int `json:"expected_version"`
}
DolphinPushRequest 描述一次推送到 Dolphin 的请求。 DolphinPushRequest describes one push into DolphinScheduler.
type DolphinPushResponse ¶ added in v1.2.0
type DolphinPushResponse struct {
ErrorMsg string `json:"error_msg"`
Data *DolphinPushResult `json:"data"`
}
type DolphinPushResult ¶ added in v1.2.0
type DolphinPushResult struct {
DryRun bool `json:"dry_run"`
Mode string `json:"mode"`
Script *DolphinScriptResult `json:"script,omitempty"`
Binding *TaskSchedulerBinding `json:"binding,omitempty"`
WorkflowCode int64 `json:"workflow_code,omitempty"`
TaskCode int64 `json:"task_code,omitempty"`
Version int `json:"version,omitempty"`
ReleaseState string `json:"release_state,omitempty"`
WouldOffline bool `json:"would_offline,omitempty"`
Cycle bool `json:"cycle"`
Message string `json:"message,omitempty"`
Warning string `json:"warning,omitempty"`
// Schedules 是推送前目标工作流的定时(复用 / 更新模式),供告知用户「沿用工作流定时」与上下线影响。
// Schedules are the target workflow's schedules before the push (reuse / update), so users learn the
// workflow's own schedule takes over and how re-onlining affects it.
Schedules []DolphinScheduleInfo `json:"schedules"`
// SchedulesRestored 是重新上线后恢复为在线的定时 ID;推送前已暂停的定时保持暂停,不在此列。
// SchedulesRestored lists schedule IDs brought back online after re-onlining; schedules paused before the
// push stay paused and are not listed.
SchedulesRestored []int64 `json:"schedules_restored"`
}
DolphinPushResult 返回推送预览或实际写入结果。 DolphinPushResult returns a dry-run preview or the written binding.
type DolphinScheduleInfo ¶ added in v1.2.0
type DolphinScheduleInfo struct {
ID int64 `json:"id"`
Crontab string `json:"crontab"`
Timezone string `json:"timezone"`
ReleaseState string `json:"release_state"`
}
DolphinScheduleInfo 是 Dolphin 工作流的一条定时(定时是独立资源,按工作流 code 关联,有自己的上下线状态)。 DolphinScheduleInfo is one schedule of a Dolphin workflow (schedules are separate resources linked by workflow code, with their own release state).
type DolphinScriptResponse ¶ added in v1.2.0
type DolphinScriptResponse struct {
ErrorMsg string `json:"error_msg"`
Data *DolphinScriptResult `json:"data"`
}
type DolphinScriptResult ¶ added in v1.2.0
type DolphinScriptResult struct {
Script string `json:"script"`
EnvNotes string `json:"env_notes"`
Timeout string `json:"timeout,omitempty"`
WorkerGroup string `json:"worker_group"`
Environment string `json:"environment"`
Variables map[string]string `json:"variables,omitempty"`
}
DolphinScriptResult 是给 Dolphin SHELL 节点使用的脚本和环境说明。 DolphinScriptResult is the SHELL script and environment notes for a Dolphin node.
func BuildDolphinShellScript ¶ added in v1.2.0
func BuildDolphinShellScript(task *Task, variables map[string]string, workerGroup, environment string) *DolphinScriptResult
BuildDolphinShellScript 生成 SHELL 节点脚本;没有覆盖变量时不追加 --var,也不写入 --timeout。 BuildDolphinShellScript builds the SHELL node script, omits --var without overrides, and never writes --timeout.
type DolphinTaskStatus ¶ added in v1.2.0
type DolphinTaskStatus struct {
Binding *TaskSchedulerBinding `json:"binding"`
Connection *SchedulerConnection `json:"connection,omitempty"`
Script *DolphinScriptResult `json:"script,omitempty"`
RecentJobs []*JobInstance `json:"recent_jobs"`
BuiltinLocked bool `json:"builtin_locked"`
// PublishedVersion 是任务当前已发布版本;PushedVersion 是上次推到 Dolphin 的版本。
// PublishedVersion is the task's current published version; PushedVersion is the last version pushed to Dolphin.
PublishedVersion int `json:"published_version"`
PushedVersion int `json:"pushed_version"`
// BuiltinSchedule 是任务配置的 STX 内置定时(未配置 cron 时为空)。
// BuiltinSchedule is the task's configured STX built-in schedule (nil when no cron is configured).
BuiltinSchedule *DolphinBuiltinSchedule `json:"builtin_schedule,omitempty"`
}
DolphinTaskStatus 是任务侧边栏需要的绑定、脚本和最近作业摘要。 DolphinTaskStatus is the sidebar summary of binding, script, and recent Dolphin-triggered jobs.
type DolphinTaskStatusResponse ¶ added in v1.2.0
type DolphinTaskStatusResponse struct {
ErrorMsg string `json:"error_msg"`
Data *DolphinTaskStatus `json:"data"`
}
type DolphinWorkflowDetail ¶ added in v1.2.0
type DolphinWorkflowDetail struct {
Code int64 `json:"code"`
Name string `json:"name"`
Version int `json:"version"`
ReleaseState string `json:"release_state"`
Tasks []DolphinWorkflowTask `json:"tasks"`
Relations []DolphinWorkflowRelation `json:"relations"`
// Schedules 是工作流的定时;ScheduleError 非空表示读取失败(不阻断查看工作流)。
// Schedules are the workflow's schedules; a non-empty ScheduleError means they could not be read (viewing the
// workflow still works).
Schedules []DolphinScheduleInfo `json:"schedules"`
ScheduleError string `json:"schedule_error,omitempty"`
}
DolphinWorkflowDetail 供复用工作流时展示节点列表、连线和当前版本。 DolphinWorkflowDetail is the workflow snapshot used when reusing a graph.
type DolphinWorkflowDetailResponse ¶ added in v1.2.0
type DolphinWorkflowDetailResponse struct {
ErrorMsg string `json:"error_msg"`
Data *DolphinWorkflowDetail `json:"data"`
}
type DolphinWorkflowListResponse ¶ added in v1.2.0
type DolphinWorkflowListResponse struct {
ErrorMsg string `json:"error_msg"`
Data []DolphinWorkflowSummary `json:"data"`
}
type DolphinWorkflowRelation ¶ added in v1.2.0
type DolphinWorkflowRelation struct {
PreTaskCode int64 `json:"pre_task_code"`
PostTaskCode int64 `json:"post_task_code"`
}
DolphinWorkflowRelation 是工作流里的一条有向边,供前端成环预检。 DolphinWorkflowRelation is one directed edge used by the frontend cycle preview.
type DolphinWorkflowSummary ¶ added in v1.2.0
type DolphinWorkflowSummary struct {
Code int64 `json:"code"`
Name string `json:"name"`
ReleaseState string `json:"release_state"`
Version int `json:"version"`
}
DolphinWorkflowSummary 是复用工作流时的候选列表项。 DolphinWorkflowSummary is one reusable workflow candidate.
type DolphinWorkflowTask ¶ added in v1.2.0
type DolphinWorkflowTask struct {
Code int64 `json:"code"`
Name string `json:"name"`
TaskType string `json:"task_type"`
RawScript string `json:"raw_script,omitempty"`
}
DolphinWorkflowTask 是上下游勾选项,可选带回当前 SHELL 脚本供 Diff。 DolphinWorkflowTask is one upstream/downstream checkbox candidate and may include the current SHELL script for diffs.
type EngineCallUnknownError ¶ added in v1.3.0
type EngineCallUnknownError struct {
Cause error
// APIMode 是实际请求的接口族:v2 或 v1。
// APIMode is the API family actually called: v2 or v1.
APIMode string
// BaseURL 是实际请求的基础地址:v2 为 endpoint.BaseURL,v1 为 endpoint.LegacyURL。
// BaseURL is the base address actually called: endpoint.BaseURL for v2, endpoint.LegacyURL for v1.
BaseURL string
EngineURL string
}
EngineCallUnknownError 记录结果未知时实际请求的端点,供对账按 jobId 查询。 EngineCallUnknownError records the endpoint actually called so reconcile can look the job up by id.
func (*EngineCallUnknownError) Error ¶ added in v1.3.0
func (e *EngineCallUnknownError) Error() string
Error 返回带原因的错误文本。 Error returns the error text including the cause.
func (*EngineCallUnknownError) Is ¶ added in v1.3.0
func (e *EngineCallUnknownError) Is(target error) bool
Is 让 errors.Is(err, ErrEngineCallOutcomeUnknown) 成立。 Is makes errors.Is(err, ErrEngineCallOutcomeUnknown) hold.
func (*EngineCallUnknownError) Unwrap ¶ added in v1.3.0
func (e *EngineCallUnknownError) Unwrap() error
Unwrap 暴露底层原因,便于 errors.Is 判断超时等类型。 Unwrap exposes the cause so errors.Is can still match timeouts and similar.
type EngineCheckpoint ¶
type EngineCheckpoint struct {
CheckpointID int64 `json:"checkpointId"`
CheckpointType string `json:"checkpointType"`
Status string `json:"status"`
TriggerTimestamp int64 `json:"triggerTimestamp"`
CompletedTimestamp int64 `json:"completedTimestamp,omitempty"`
DurationMillis int64 `json:"durationMillis,omitempty"`
StateSize int64 `json:"stateSize,omitempty"`
FailureReason string `json:"failureReason,omitempty"`
}
EngineCheckpoint describes one checkpoint metadata record.
type EngineCheckpointInProgress ¶
type EngineCheckpointInProgress struct {
CheckpointID int64 `json:"checkpointId"`
CheckpointType string `json:"checkpointType"`
TriggerTimestamp int64 `json:"triggerTimestamp"`
Acknowledged int64 `json:"acknowledged"`
Total int64 `json:"total"`
}
EngineCheckpointInProgress describes one running checkpoint progress row.
type EngineCheckpointOverview ¶
type EngineCheckpointOverview struct {
JobID string `json:"jobId"`
UpdatedAt int64 `json:"updatedAt"`
Pipelines []*EngineCheckpointPipeline `json:"pipelines"`
}
EngineCheckpointOverview describes one checkpoint overview payload from the engine.
type EngineCheckpointPipeline ¶
type EngineCheckpointPipeline struct {
PipelineID int `json:"pipelineId"`
Counts map[string]int64 `json:"counts"`
LatestCompleted *EngineCheckpoint `json:"latestCompleted,omitempty"`
LatestFailed *EngineCheckpoint `json:"latestFailed,omitempty"`
LatestSavepoint *EngineCheckpoint `json:"latestSavepoint,omitempty"`
InProgress []*EngineCheckpointInProgress `json:"inProgress,omitempty"`
History []*EngineCheckpointRecord `json:"history,omitempty"`
}
EngineCheckpointPipeline describes one pipeline checkpoint summary.
type EngineCheckpointRecord ¶
type EngineCheckpointRecord struct {
PipelineID int `json:"pipelineId"`
Checkpoint *EngineCheckpoint `json:"checkpoint"`
}
EngineCheckpointRecord describes one checkpoint history row.
type EngineClient ¶
type EngineClient interface {
Submit(ctx context.Context, req *EngineSubmitRequest) (*EngineSubmitResponse, error)
GetJobInfo(ctx context.Context, endpoint *EngineEndpoint, jobID string) (*EngineJobInfo, error)
ListRunningJobs(ctx context.Context, endpoint *EngineEndpoint) ([]*EngineJobListItem, error)
ListFinishedJobs(ctx context.Context, endpoint *EngineEndpoint, state string) ([]*EngineJobListItem, error)
GetJobCheckpointOverview(ctx context.Context, endpoint *EngineEndpoint, jobID string) (*EngineCheckpointOverview, error)
GetJobCheckpointHistory(ctx context.Context, endpoint *EngineEndpoint, jobID string, pipelineID *int, limit int, status string) ([]*EngineCheckpointRecord, error)
StopJob(ctx context.Context, endpoint *EngineEndpoint, jobID string, stopWithSavepoint bool) error
GetJobLogs(ctx context.Context, endpoint *EngineEndpoint, jobID string) (string, error)
}
EngineClient submits and manages jobs on SeaTunnel Engine REST API V2.
type EngineEndpoint ¶
EngineEndpoint describes one SeaTunnel REST endpoint.
type EngineEvent ¶ added in v1.3.0
type EngineEvent struct {
ID uint `json:"id" gorm:"primaryKey;autoIncrement"`
ClusterID uint `json:"cluster_id" gorm:"not null;index:idx_sync_engine_events_cluster_time,priority:1"`
EngineJobID string `json:"engine_job_id" gorm:"size:64;index"`
JobInstanceID *uint `json:"job_instance_id,omitempty" gorm:"index"`
EventType string `json:"event_type" gorm:"size:64;not null;index"`
JobStatus string `json:"job_status,omitempty" gorm:"size:32"`
EventTimeMs int64 `json:"event_time_ms" gorm:"not null;index:idx_sync_engine_events_cluster_time,priority:2"`
Payload JSONMap `json:"payload" gorm:"type:json"`
DedupeKey string `json:"-" gorm:"size:64;not null;uniqueIndex"`
ReceivedAt time.Time `json:"received_at" gorm:"not null;index"`
}
EngineEvent 是一条清洗、去重后的引擎事件(JOB_STATUS、schema change、生命周期、CDC 延迟分钟桶)。 EngineEvent is one sanitized, de-duplicated engine event (JOB_STATUS, schema change, lifecycle, CDC delay minute bucket).
func (EngineEvent) TableName ¶ added in v1.3.0
func (EngineEvent) TableName() string
TableName 返回引擎事件表名。 TableName returns the engine event table name.
type EngineEventChannel ¶ added in v1.3.0
type EngineEventChannel struct {
ClusterID uint `json:"cluster_id" gorm:"primaryKey;autoIncrement:false"`
Enabled bool `json:"enabled" gorm:"not null"`
TokenNonce string `json:"-" gorm:"size:64"`
ReportNonTerminal bool `json:"report_non_terminal" gorm:"not null"`
ConfigAppliedAt *time.Time `json:"config_applied_at,omitempty"`
ConfigApplyError string `json:"config_apply_error,omitempty" gorm:"type:text"`
LastEventAt *time.Time `json:"last_event_at,omitempty"`
LastBatchAt *time.Time `json:"last_batch_at,omitempty"`
ReceivedCount int64 `json:"received_count" gorm:"not null;default:0"`
DuplicateCount int64 `json:"duplicate_count" gorm:"not null;default:0"`
DroppedCount int64 `json:"dropped_count" gorm:"not null;default:0"`
ParseErrorCount int64 `json:"parse_error_count" gorm:"not null;default:0"`
AuthFailCount int64 `json:"auth_fail_count" gorm:"not null;default:0"`
ExpectMissedAt *time.Time `json:"expect_missed_at,omitempty"`
ExpectSatisfiedAt *time.Time `json:"expect_satisfied_at,omitempty"`
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"`
}
EngineEventChannel 记录一个集群的 SeaTunnel 事件上报通道(event-report-http → STX)的开关与健康状态。 token 不落库:每次用 SessionSecret 与 TokenNonce 做 HMAC 派生,轮换 token 只需更换 nonce。 EngineEventChannel records the on/off state and health of one cluster's SeaTunnel event-report-http channel. The token is never stored: it is derived via HMAC from SessionSecret and TokenNonce, so rotation only swaps the nonce.
func (EngineEventChannel) TableName ¶ added in v1.3.0
func (EngineEventChannel) TableName() string
TableName 返回事件通道表名。 TableName returns the event channel table name.
type EngineEventIngestResponse ¶ added in v1.3.0
type EngineEventIngestResponse struct {
ErrorMsg string `json:"error_msg"`
Data *EngineEventIngestResult `json:"data"`
}
EngineEventIngestResponse 包装事件接收结果。 EngineEventIngestResponse wraps the event ingest result.
type EngineEventIngestResult ¶ added in v1.3.0
type EngineEventIngestResult struct {
Accepted int `json:"accepted"`
Duplicates int `json:"duplicates"`
Dropped int `json:"dropped"`
Ignored string `json:"ignored,omitempty"`
}
EngineEventIngestResult 是接收端对一批事件的处理摘要。 EngineEventIngestResult summarizes how one event batch was handled.
type EngineEventReportNodeResult ¶ added in v1.3.0
type EngineEventReportNodeResult struct {
ConfigID uint `json:"config_id"`
HostID *uint `json:"host_id,omitempty"`
Template bool `json:"template"`
Changed bool `json:"changed"`
Pushed bool `json:"pushed"`
Pending bool `json:"pending"`
Error string `json:"error,omitempty"`
}
EngineEventReportNodeResult 是一份 seatunnel.yaml 的写入结果。 EngineEventReportNodeResult is the write outcome for one seatunnel.yaml.
type EngineEventReportSettings ¶ added in v1.3.0
type EngineEventReportSettings struct {
URL string
Headers map[string]string
ReportNonTerminal bool
}
EngineEventReportSettings 是要写入 seatunnel.yaml 的 event-report-http 内容(sync 侧定义,router 适配到 config 应用)。 EngineEventReportSettings is the event-report-http content for seatunnel.yaml (defined in sync and adapted to the config app in the router).
type EngineJobInfo ¶
type EngineJobInfo struct {
JobID string `json:"jobId"`
JobName string `json:"jobName"`
JobStatus string `json:"jobStatus"`
CreateTime string `json:"createTime"`
FinishedTime string `json:"finishTime"`
ErrorMsg interface{} `json:"errorMsg"`
JobDag map[string]interface{} `json:"jobDag"`
Metrics map[string]interface{} `json:"metrics"`
}
EngineJobInfo describes job-info response subset used by sync studio.
type EngineJobListItem ¶ added in v1.2.0
type EngineJobListItem struct {
JobID string `json:"jobId"`
JobName string `json:"jobName"`
JobStatus string `json:"jobStatus"`
CreateTime string `json:"createTime"`
FinishedTime string `json:"finishTime"`
ErrorMsg interface{} `json:"errorMsg"`
}
EngineJobListItem 是 running/finished 列表接口返回的单条作业摘要。 EngineJobListItem is one job row from running/finished list APIs.
type EngineRealtimeClient ¶ added in v1.3.0
type EngineRealtimeClient interface {
GetRealtimeJobs(ctx context.Context, endpoint *EngineEndpoint) (*EngineRealtimeJobs, error)
GetRealtimeVertices(ctx context.Context, endpoint *EngineEndpoint, jobID string, windowMs int64) (*EngineRealtimeSeries, error)
GetRealtimeEdges(ctx context.Context, endpoint *EngineEndpoint, jobID string, windowMs int64) (*EngineRealtimeSeries, error)
}
EngineRealtimeClient 是可选能力:实现了它的引擎客户端才能代理 /metrics/realtime。 不扩展 EngineClient,避免牵动大量测试桩。 EngineRealtimeClient is an optional capability; only engine clients implementing it can proxy /metrics/realtime. It is kept separate from EngineClient so existing test stubs stay untouched.
type EngineRealtimeEdge ¶ added in v1.3.0
type EngineRealtimeEdge struct {
QueueID int64 `json:"queueId"`
TargetVertexID int64 `json:"targetVertexId"`
Points []map[string]any `json:"points"`
}
EngineRealtimeEdge 是一条带中间队列的边的时间序列,按 queueId 区分,targetVertexId 指向下游节点。 EngineRealtimeEdge is one queue-backed edge time series keyed by queueId; targetVertexId is the downstream vertex.
type EngineRealtimeJobMeta ¶ added in v1.3.0
type EngineRealtimeJobMeta struct {
JobID json.Number `json:"jobId"`
Enabled bool `json:"enabled"`
BucketMs int64 `json:"bucketMs"`
RetentionMinutes int `json:"retentionMinutes"`
LatestBucketStartMs int64 `json:"latestBucketStartMs"`
}
EngineRealtimeJobMeta 是 active master 上一条运行中作业的采集状态。jobId 是 Java long,用 json.Number 防止精度丢失。 EngineRealtimeJobMeta is one running job's collection status on the active master. jobId is a Java long, decoded as json.Number to avoid precision loss.
type EngineRealtimeJobs ¶ added in v1.3.0
type EngineRealtimeJobs struct {
Jobs []EngineRealtimeJobMeta `json:"jobs"`
Collector map[string]any `json:"collector"`
}
EngineRealtimeJobs 对应 GET /metrics/realtime/jobs。 EngineRealtimeJobs mirrors GET /metrics/realtime/jobs.
type EngineRealtimeSeries ¶ added in v1.3.0
type EngineRealtimeSeries struct {
Known bool `json:"-"`
Enabled *bool `json:"enabled,omitempty"`
BucketMs int64 `json:"bucketMs"`
FromMs int64 `json:"fromMs"`
ToMs int64 `json:"toMs"`
Vertices []EngineRealtimeVertex `json:"vertices"`
Edges []EngineRealtimeEdge `json:"edges"`
}
EngineRealtimeSeries 对应 vertices/edges 两个接口;作业未知时引擎返回 {},此时 Known=false。 EngineRealtimeSeries mirrors the vertices/edges endpoints; the engine returns {} for unknown jobs, giving Known=false.
type EngineRealtimeVertex ¶ added in v1.3.0
type EngineRealtimeVertex struct {
VertexID int64 `json:"vertexId"`
Points []map[string]any `json:"points"`
}
EngineRealtimeVertex 是一个 DAG 节点的时间序列,point 字段名保持引擎原样(camelCase)。 EngineRealtimeVertex is one DAG vertex time series; point field names are kept as the engine sends them (camelCase).
type EngineSubmitRequest ¶
type EngineSubmitRequest struct {
Endpoint *EngineEndpoint
Format string
JobID string
JobName string
StartWithSavepoint bool
Body []byte
}
EngineSubmitRequest describes one submit request.
type EngineSubmitResponse ¶
type EngineSubmitResponse struct {
JobID string `json:"jobId"`
JobName string `json:"jobName"`
APIMode string `json:"apiMode,omitempty"`
EndpointBaseURL string `json:"endpointBaseUrl,omitempty"`
EngineURL string `json:"engineUrl,omitempty"`
EngineMethod string `json:"engineMethod,omitempty"`
}
EngineSubmitResponse describes submit response payload.
type EventChannelResponse ¶ added in v1.3.0
type EventChannelResponse struct {
ErrorMsg string `json:"error_msg"`
Data *EventChannelStatus `json:"data"`
}
EventChannelResponse 包装事件通道状态。 EventChannelResponse wraps the event channel status.
type EventChannelStatus ¶ added in v1.3.0
type EventChannelStatus struct {
ClusterID uint `json:"cluster_id"`
Enabled bool `json:"enabled"`
State string `json:"state"`
TokenSet bool `json:"token_set"`
URL string `json:"url"`
Version string `json:"version"`
Supported bool `json:"supported"`
ReportNonTerminal bool `json:"report_non_terminal"`
RestartRequired bool `json:"restart_required"`
ConfigAppliedAt *time.Time `json:"config_applied_at,omitempty"`
ConfigApplyError string `json:"config_apply_error,omitempty"`
LastEventAt *time.Time `json:"last_event_at,omitempty"`
LastBatchAt *time.Time `json:"last_batch_at,omitempty"`
ReceivedCount int64 `json:"received_count"`
DuplicateCount int64 `json:"duplicate_count"`
DroppedCount int64 `json:"dropped_count"`
ParseErrorCount int64 `json:"parse_error_count"`
AuthFailCount int64 `json:"auth_fail_count"`
ExpectMissedAt *time.Time `json:"expect_missed_at,omitempty"`
ExpectSatisfiedAt *time.Time `json:"expect_satisfied_at,omitempty"`
Configs []EngineEventReportNodeResult `json:"configs,omitempty"`
}
EventChannelStatus 是事件通道的对外视图;token 只以 token_set 表示,永不返回原文。 EventChannelStatus is the public view of an event channel; the token is only exposed as token_set.
type EventReportConfigApplier ¶ added in v1.3.0
type EventReportConfigApplier interface {
ApplyEventReportConfig(ctx context.Context, clusterID uint, settings *EngineEventReportSettings, userID uint) ([]EngineEventReportNodeResult, error)
}
EventReportConfigApplier 写入或移除集群 seatunnel.yaml 中的 event-report-http(settings 为 nil 表示移除)。 EventReportConfigApplier writes or removes event-report-http in the cluster seatunnel.yaml (nil settings remove it).
type ExecutionRequest ¶
type ExecutionRequest struct {
RequestID string
IdempotencyKey string
RequestHash string
ClientType string
}
ExecutionRequest 保存一次同步写操作的非敏感请求元数据。 ExecutionRequest stores non-sensitive request metadata for one sync write operation.
type ExecutionTarget ¶
type ExecutionTargetResolver ¶
type ForkCuratedTemplateRequest ¶ added in v1.0.0
type ForkCuratedTemplateRequest struct {
BuiltinID string `json:"builtin_id" binding:"required"`
Name string `json:"name"`
Description string `json:"description"`
}
ForkCuratedTemplateRequest forks a built-in curated template. ForkCuratedTemplateRequest 从内置精选 fork 用户副本。
type GlobalVariable ¶
type GlobalVariable struct {
ID uint `json:"id" gorm:"primaryKey;autoIncrement"`
Key string `json:"key" gorm:"size:120;not null;uniqueIndex"`
Value string `json:"value" gorm:"type:text"`
ValueType string `json:"value_type" gorm:"size:32;not null;default:'string'"`
Description string `json:"description" gorm:"type:text"`
CreatedBy uint `json:"created_by"`
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"`
}
GlobalVariable represents one workspace-wide runtime variable. GlobalVariable 表示一个工作台级别的全局运行时变量。
func (*GlobalVariable) MaskSecret ¶
func (v *GlobalVariable) MaskSecret() *GlobalVariable
MaskSecret returns a safe copy with value masked to "******" if it is a secret variable. MaskSecret 若为敏感机密变量,返回变量值脱敏为 "******" 的安全副本。
func (GlobalVariable) TableName ¶
func (GlobalVariable) TableName() string
TableName returns the sync global variable table name. TableName 返回同步全局变量表名。
type GlobalVariableListData ¶
type GlobalVariableListData struct {
Total int64 `json:"total"`
Items []*GlobalVariable `json:"items"`
}
GlobalVariableListData represents paginated global variables.
type GlobalVariableListResponse ¶
type GlobalVariableListResponse struct {
ErrorMsg string `json:"error_msg"`
Data *GlobalVariableListData `json:"data"`
}
type GlobalVariableResponse ¶
type GlobalVariableResponse struct {
ErrorMsg string `json:"error_msg"`
Data *GlobalVariable `json:"data"`
}
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler 提供数据同步工作台 HTTP 处理器。 Handler provides HTTP handlers for sync studio APIs.
func (*Handler) CancelJobByRef ¶ added in v1.2.0
CancelJobByRef 处理 POST /api/v1/sync/jobs/cancel-by-ref。 CancelJobByRef handles POST /api/v1/sync/jobs/cancel-by-ref. @Summary 按外部调度引用停止作业 @Tags Sync @Accept json @Produce json @Param request body CancelByRefRequest true "外部引用与接管序号" @Success 200 {object} JobResponse @Failure 400 {object} JobResponse @Failure 409 {object} JobResponse @Router /api/v1/sync/jobs/cancel-by-ref [post]
func (*Handler) CollectPreview ¶
CollectPreview handles POST /api/v1/sync/preview/collect.
func (*Handler) CreateCuratedTemplate ¶ added in v1.0.0
CreateCuratedTemplate handles POST /api/v1/sync/curated-templates. CreateCuratedTemplate 处理创建精选模板。
func (*Handler) CreateGlobalVariable ¶
CreateGlobalVariable 处理 POST /api/v1/sync/global-variables。 CreateGlobalVariable handles POST /api/v1/sync/global-variables.
func (*Handler) CreateSchedulerConnection ¶ added in v1.2.0
CreateSchedulerConnection 处理 POST /api/v1/sync/scheduler-connections。 CreateSchedulerConnection handles POST /api/v1/sync/scheduler-connections. @Summary 创建调度器连接 @Tags Sync @Accept json @Produce json @Param request body SchedulerConnectionRequest true "连接信息" @Success 200 {object} SchedulerConnectionResponse @Failure 400 {object} SchedulerConnectionResponse @Router /api/v1/sync/scheduler-connections [post]
func (*Handler) CreateTask ¶
CreateTask handles POST /api/v1/sync/tasks.
func (*Handler) DeleteCuratedTemplate ¶ added in v1.0.0
DeleteCuratedTemplate handles DELETE /api/v1/sync/curated-templates/:id. DeleteCuratedTemplate 处理删除精选模板。
func (*Handler) DeleteGlobalVariable ¶
DeleteGlobalVariable handles DELETE /api/v1/sync/global-variables/:id.
func (*Handler) DeleteTask ¶
DeleteTask handles DELETE /api/v1/sync/tasks/:id.
func (*Handler) DeleteTaskAlert ¶ added in v1.3.0
DeleteTaskAlert 处理 DELETE /api/v1/sync/tasks/:id/alert;只在网页和 API 提供,CLI 用 set --disable 停用。 DeleteTaskAlert handles DELETE /api/v1/sync/tasks/:id/alert; only offered in the web UI and API, the CLI disables with set --disable. @Summary 删除任务的作业告警配置 @Tags Sync @Produce json @Param id path int true "任务 ID" @Success 200 {object} TaskAlertResponse @Failure 400 {object} TaskAlertResponse @Failure 403 {object} TaskAlertResponse @Failure 404 {object} TaskAlertResponse @Failure 428 {object} TaskAlertResponse @Failure 503 {object} TaskAlertResponse @Router /api/v1/sync/tasks/{id}/alert [delete]
func (*Handler) DeleteTaskVersion ¶
DeleteTaskVersion handles DELETE /api/v1/sync/tasks/:id/versions/:versionId.
func (*Handler) ForkCuratedTemplate ¶ added in v1.0.0
ForkCuratedTemplate handles POST /api/v1/sync/curated-templates/fork. ForkCuratedTemplate 处理 fork 内置精选。
func (*Handler) GetDolphinScript ¶ added in v1.2.0
GetDolphinScript 处理 GET /api/v1/sync/tasks/:id/dolphin/script。 GetDolphinScript handles GET /api/v1/sync/tasks/:id/dolphin/script. @Summary 生成 Dolphin SHELL 节点脚本 @Tags Sync @Produce json @Param id path int true "任务 ID" @Param worker_group query string false "Dolphin worker group" @Param environment query string false "Dolphin worker environment" @Success 200 {object} DolphinScriptResponse @Failure 400 {object} DolphinScriptResponse @Router /api/v1/sync/tasks/{id}/dolphin/script [get]
func (*Handler) GetDolphinTaskStatus ¶ added in v1.2.0
GetDolphinTaskStatus 处理 GET /api/v1/sync/tasks/:id/dolphin。 GetDolphinTaskStatus handles GET /api/v1/sync/tasks/:id/dolphin. @Summary 获取任务的 Dolphin 绑定状态 @Tags Sync @Produce json @Param id path int true "任务 ID" @Success 200 {object} DolphinTaskStatusResponse @Failure 400 {object} DolphinTaskStatusResponse @Failure 404 {object} DolphinTaskStatusResponse @Router /api/v1/sync/tasks/{id}/dolphin [get]
func (*Handler) GetDolphinWorkflow ¶ added in v1.2.0
GetDolphinWorkflow 处理 GET /api/v1/sync/scheduler-connections/:id/projects/:projectCode/workflows/:workflowCode。 GetDolphinWorkflow handles GET /api/v1/sync/scheduler-connections/:id/projects/:projectCode/workflows/:workflowCode. @Summary 读取 Dolphin 工作流定义 @Tags Sync @Produce json @Param id path int true "连接 ID" @Param projectCode path int true "项目 code" @Param workflowCode path int true "工作流 code" @Success 200 {object} DolphinWorkflowDetailResponse @Failure 400 {object} DolphinWorkflowDetailResponse @Router /api/v1/sync/scheduler-connections/{id}/projects/{projectCode}/workflows/{workflowCode} [get]
func (*Handler) GetEventChannel ¶ added in v1.3.0
GetEventChannel 处理 GET /api/v1/sync/event-channels/:cluster_id。 GetEventChannel handles GET /api/v1/sync/event-channels/:cluster_id. @Summary 获取集群事件通道状态 @Tags Sync @Produce json @Param cluster_id path int true "集群 ID" @Success 200 {object} EventChannelResponse @Failure 400 {object} EventChannelResponse @Failure 404 {object} EventChannelResponse @Router /api/v1/sync/event-channels/{cluster_id} [get]
func (*Handler) GetJobCheckpointSnapshot ¶
GetJobCheckpointSnapshot handles GET /api/v1/sync/jobs/:id/checkpoint.
func (*Handler) GetJobLogs ¶
GetJobLogs handles GET /api/v1/sync/jobs/:id/logs.
func (*Handler) GetJobPlanDAG ¶ added in v1.3.0
GetJobPlanDAG 处理 GET /api/v1/sync/jobs/:id/plan-dag:用提交时的配置推导表结构与建表计划,拿不到时以 available=false 表达。 GetJobPlanDAG handles GET /api/v1/sync/jobs/:id/plan-dag: it derives table schemas and save-mode plans from the submitted config, expressing unavailability as available=false. @Summary 获取作业提交配置推导的计划 DAG(表结构与建表计划) @Tags Sync @Produce json @Param id path int true "作业 ID" @Success 200 {object} JobPlanDAGResponse @Failure 400 {object} JobPlanDAGResponse @Failure 403 {object} JobPlanDAGResponse @Failure 404 {object} JobPlanDAGResponse @Router /api/v1/sync/jobs/{id}/plan-dag [get]
func (*Handler) GetJobPrometheusMetrics ¶ added in v1.3.0
GetJobPrometheusMetrics 处理 GET /api/v1/monitoring/prometheus/jobs/metrics(公开抓取,受 observability.enabled 控制)。 GetJobPrometheusMetrics handles GET /api/v1/monitoring/prometheus/jobs/metrics (public scrape, gated by observability.enabled).
func (*Handler) GetJobRealtime ¶ added in v1.3.0
GetJobRealtime 处理 GET /api/v1/sync/jobs/:id/realtime:返回引擎实时指标与瓶颈提示,引擎不可用时以 available=false 表达。 GetJobRealtime handles GET /api/v1/sync/jobs/:id/realtime: it returns engine realtime metrics and bottleneck hints, expressing engine unavailability as available=false. @Summary 获取作业实时指标与瓶颈提示 @Tags Sync @Produce json @Param id path int true "作业 ID" @Param window_ms query int false "时间窗口(毫秒),超出引擎上限时截断" @Success 200 {object} JobRealtimeResponse @Failure 400 {object} JobRealtimeResponse @Failure 403 {object} JobRealtimeResponse @Failure 404 {object} JobRealtimeResponse @Router /api/v1/sync/jobs/{id}/realtime [get]
func (*Handler) GetJobTimeseries ¶ added in v1.3.0
GetJobTimeseries 处理 GET /api/v1/sync/jobs/:id/timeseries:按 PromQL 模板查 Prometheus,无本地兜底。 GetJobTimeseries handles GET /api/v1/sync/jobs/:id/timeseries: queries Prometheus via PromQL templates with no local fallback. @Summary 获取作业指标时序(Prometheus) @Tags Sync @Produce json @Param id path int true "作业 ID" @Param range query string false "时间范围:15m|1h|6h|24h|7d" default(1h) @Param step query int false "步长(秒),0 表示按范围自动" @Param metrics query string false "逗号分隔指标:throughput,rows,cdc_delay,checkpoint,busy,backpressure" @Success 200 {object} JobTimeseriesResponse @Failure 400 {object} JobTimeseriesResponse @Failure 403 {object} JobTimeseriesResponse @Failure 404 {object} JobTimeseriesResponse @Router /api/v1/sync/jobs/{id}/timeseries [get]
func (*Handler) GetPluginOptions ¶
GetPluginOptions handles POST /api/v1/sync/plugins/options.
func (*Handler) GetPreviewSnapshot ¶
GetPreviewSnapshot handles GET /api/v1/sync/jobs/:id/preview.
func (*Handler) GetTaskAlert ¶ added in v1.3.0
GetTaskAlert 处理 GET /api/v1/sync/tasks/:id/alert。 GetTaskAlert handles GET /api/v1/sync/tasks/:id/alert. @Summary 获取任务的作业告警配置 @Tags Sync @Produce json @Param id path int true "任务 ID" @Success 200 {object} TaskAlertResponse @Failure 400 {object} TaskAlertResponse @Failure 403 {object} TaskAlertResponse @Failure 404 {object} TaskAlertResponse @Failure 503 {object} TaskAlertResponse @Router /api/v1/sync/tasks/{id}/alert [get]
func (*Handler) GetTaskDAG ¶
GetTaskDAG handles POST /api/v1/sync/tasks/:id/dag.
func (*Handler) GetTaskPermissions ¶ added in v1.0.0
GetTaskPermissions 处理 GET /api/v1/sync/tasks/:id/permissions。 GetTaskPermissions handles GET /api/v1/sync/tasks/:id/permissions. @Summary 获取同步任务共享权限 @Tags Sync @Produce json @Param id path int true "任务 ID" @Success 200 {object} TaskPermissionsResponse @Failure 400 {object} TaskPermissionsResponse @Failure 403 {object} TaskPermissionsResponse @Failure 404 {object} TaskPermissionsResponse @Router /api/v1/sync/tasks/{id}/permissions [get]
func (*Handler) GetTaskTree ¶
GetTaskTree handles GET /api/v1/sync/tree.
func (*Handler) IngestEngineEvents ¶ added in v1.3.0
IngestEngineEvents 处理 POST /api/v1/sync/engine-events/:cluster_id(SeaTunnel event-report-http 回调,无需登录)。 只有 token 错误返回 401;其余情况都返回 200,避免引擎反复重试同一批而堵住后续事件。 IngestEngineEvents handles POST /api/v1/sync/engine-events/:cluster_id (SeaTunnel event-report-http callback, no login). Only a bad token returns 401; everything else returns 200 so the engine never retries one batch forever. @Summary 接收 SeaTunnel 引擎事件上报 @Tags Sync @Accept json @Produce json @Param cluster_id path int true "集群 ID" @Param Authorization header string true "Bearer <事件通道 token>" @Param request body []object true "引擎事件批次" @Success 200 {object} EngineEventIngestResponse @Failure 401 {object} EngineEventIngestResponse @Router /api/v1/sync/engine-events/{cluster_id} [post]
func (*Handler) ListCuratedTemplates ¶ added in v1.0.0
ListCuratedTemplates handles POST /api/v1/sync/curated-templates/list. ListCuratedTemplates 处理精选模板列表。
func (*Handler) ListDolphinProjects ¶ added in v1.2.0
ListDolphinProjects 处理 GET /api/v1/sync/scheduler-connections/:id/projects。 ListDolphinProjects handles GET /api/v1/sync/scheduler-connections/:id/projects. @Summary 列出 Dolphin 项目 @Tags Sync @Produce json @Param id path int true "连接 ID" @Success 200 {object} DolphinProjectListResponse @Failure 400 {object} DolphinProjectListResponse @Router /api/v1/sync/scheduler-connections/{id}/projects [get]
func (*Handler) ListDolphinWorkflows ¶ added in v1.2.0
ListDolphinWorkflows 处理 GET /api/v1/sync/scheduler-connections/:id/projects/:projectCode/workflows。 ListDolphinWorkflows handles GET /api/v1/sync/scheduler-connections/:id/projects/:projectCode/workflows. @Summary 列出 Dolphin 工作流 @Tags Sync @Produce json @Param id path int true "连接 ID" @Param projectCode path int true "项目 code" @Success 200 {object} DolphinWorkflowListResponse @Failure 400 {object} DolphinWorkflowListResponse @Router /api/v1/sync/scheduler-connections/{id}/projects/{projectCode}/workflows [get]
func (*Handler) ListGlobalVariables ¶
ListGlobalVariables handles GET /api/v1/sync/global-variables.
func (*Handler) ListJobEvents ¶ added in v1.3.0
ListJobEvents 处理 GET /api/v1/sync/jobs/:id/events。 ListJobEvents handles GET /api/v1/sync/jobs/:id/events. @Summary 获取作业事件时间线 @Tags Sync @Produce json @Param id path int true "作业 ID" @Param types query string false "按事件类型过滤,逗号分隔" @Param page query int false "页码,从 1 开始" @Param page_size query int false "每页条数" @Success 200 {object} JobEventListResponse @Failure 400 {object} JobEventListResponse @Failure 403 {object} JobEventListResponse @Failure 404 {object} JobEventListResponse @Router /api/v1/sync/jobs/{id}/events [get]
func (*Handler) ListPluginEnumCatalog ¶
ListPluginEnumCatalog handles POST /api/v1/sync/plugins/enum-catalog.
func (*Handler) ListPluginEnumValues ¶
ListPluginEnumValues handles POST /api/v1/sync/plugins/enum-values.
func (*Handler) ListPluginFactories ¶
ListPluginFactories handles POST /api/v1/sync/plugins/list.
func (*Handler) ListSchedulerConnections ¶ added in v1.2.0
ListSchedulerConnections 处理 GET /api/v1/sync/scheduler-connections。 ListSchedulerConnections handles GET /api/v1/sync/scheduler-connections. @Summary 列出调度器连接 @Tags Sync @Produce json @Success 200 {object} SchedulerConnectionListResponse @Router /api/v1/sync/scheduler-connections [get]
func (*Handler) ListTaskVersions ¶
ListTaskVersions handles GET /api/v1/sync/tasks/:id/versions.
func (*Handler) ParseCuratedCombo ¶ added in v1.0.0
ParseCuratedCombo handles POST /api/v1/sync/curated-templates/parse-combo. ParseCuratedCombo 处理一键组合四节解析。
func (*Handler) PreviewSinkSaveMode ¶
PreviewSinkSaveMode handles POST /api/v1/sync/tasks/:id/preview/sink-savemode.
func (*Handler) PreviewTask ¶
PreviewTask handles POST /api/v1/sync/tasks/:id/preview.
func (*Handler) PublishTask ¶
PublishTask handles POST /api/v1/sync/tasks/:id/publish.
func (*Handler) PushDolphin ¶ added in v1.2.0
PushDolphin 处理 POST /api/v1/sync/tasks/:id/dolphin/push。 PushDolphin handles POST /api/v1/sync/tasks/:id/dolphin/push. @Summary 把同步任务推送到 DolphinScheduler @Tags Sync @Accept json @Produce json @Param id path int true "任务 ID" @Param request body DolphinPushRequest true "推送请求" @Success 200 {object} DolphinPushResponse @Failure 400 {object} DolphinPushResponse @Failure 409 {object} DolphinPushResponse @Router /api/v1/sync/tasks/{id}/dolphin/push [post]
func (*Handler) RecoverJob ¶
RecoverJob handles POST /api/v1/sync/jobs/:id/recover.
func (*Handler) RenderCuratedTemplate ¶ added in v1.0.0
RenderCuratedTemplate handles POST /api/v1/sync/curated-templates/render. RenderCuratedTemplate 按集群版本渲染可插入正文(含低版本 plugin IO 改写)。
func (*Handler) RenderPluginTemplate ¶
RenderPluginTemplate handles POST /api/v1/sync/plugins/template.
func (*Handler) RollbackTaskVersion ¶
RollbackTaskVersion handles POST /api/v1/sync/tasks/:id/versions/:versionId/rollback.
func (*Handler) SetAuditRepository ¶ added in v1.0.0
func (h *Handler) SetAuditRepository(repo *audit.Repository)
SetAuditRepository 配置工作台写操作使用的审计仓库。 SetAuditRepository configures the audit repository for sync writes.
func (*Handler) SubmitTask ¶
SubmitTask handles POST /api/v1/sync/tasks/:id/submit.
func (*Handler) TestTaskConnections ¶
TestTaskConnections handles POST /api/v1/sync/tasks/:id/test-connections.
func (*Handler) UnbindDolphin ¶ added in v1.2.0
UnbindDolphin 处理 POST /api/v1/sync/tasks/:id/dolphin/unbind。 UnbindDolphin handles POST /api/v1/sync/tasks/:id/dolphin/unbind. @Summary 解除任务与 Dolphin 的绑定 @Tags Sync @Produce json @Param id path int true "任务 ID" @Success 200 {object} BasicResponse @Failure 400 {object} BasicResponse @Router /api/v1/sync/tasks/{id}/dolphin/unbind [post]
func (*Handler) UpdateCuratedTemplate ¶ added in v1.0.0
UpdateCuratedTemplate handles PUT /api/v1/sync/curated-templates/:id. UpdateCuratedTemplate 处理更新精选模板。
func (*Handler) UpdateEventChannel ¶ added in v1.3.0
UpdateEventChannel 处理 PUT /api/v1/sync/event-channels/:cluster_id;CLI 与直接 API 调用走 R2 确认与幂等,网页保持原有交互。 UpdateEventChannel handles PUT /api/v1/sync/event-channels/:cluster_id; CLI and direct API calls go through R2 confirmation and idempotency while web requests keep their dialog-based flow. @Summary 开关集群事件通道或轮换 token(改写 seatunnel.yaml,需滚动重启生效) @Tags Sync @Accept json @Produce json @Param cluster_id path int true "集群 ID" @Param request body UpdateEventChannelRequest true "事件通道设置" @Success 200 {object} EventChannelResponse @Failure 400 {object} EventChannelResponse @Failure 403 {object} EventChannelResponse @Failure 404 {object} EventChannelResponse @Failure 409 {object} EventChannelResponse @Failure 428 {object} EventChannelResponse @Router /api/v1/sync/event-channels/{cluster_id} [put]
func (*Handler) UpdateGlobalVariable ¶
UpdateGlobalVariable handles PUT /api/v1/sync/global-variables/:id.
func (*Handler) UpdateSchedulerConnection ¶ added in v1.2.0
UpdateSchedulerConnection 处理 PUT /api/v1/sync/scheduler-connections/:id。 UpdateSchedulerConnection handles PUT /api/v1/sync/scheduler-connections/:id. @Summary 更新调度器连接 @Tags Sync @Accept json @Produce json @Param id path int true "连接 ID" @Param request body SchedulerConnectionRequest true "连接信息,空 token 表示保留原值" @Success 200 {object} SchedulerConnectionResponse @Failure 400 {object} SchedulerConnectionResponse @Failure 404 {object} SchedulerConnectionResponse @Router /api/v1/sync/scheduler-connections/{id} [put]
func (*Handler) UpdateTask ¶
UpdateTask handles PUT /api/v1/sync/tasks/:id.
func (*Handler) UpdateTaskAlert ¶ added in v1.3.0
UpdateTaskAlert 处理 PUT /api/v1/sync/tasks/:id/alert;CLI 与直接 API 调用走 R1 确认与幂等,网页保持原有交互。 UpdateTaskAlert handles PUT /api/v1/sync/tasks/:id/alert; CLI and direct API calls go through R1 confirmation and idempotency while web requests keep their own flow. @Summary 保存任务的作业告警配置(立即生效) @Tags Sync @Accept json @Produce json @Param id path int true "任务 ID" @Param request body TaskAlertRequest true "作业告警配置" @Success 200 {object} TaskAlertResponse @Failure 400 {object} TaskAlertResponse @Failure 403 {object} TaskAlertResponse @Failure 404 {object} TaskAlertResponse @Failure 409 {object} TaskAlertResponse @Failure 428 {object} TaskAlertResponse @Failure 503 {object} TaskAlertResponse @Router /api/v1/sync/tasks/{id}/alert [put]
func (*Handler) UpdateTaskPermissions ¶ added in v1.0.0
UpdateTaskPermissions 处理 PUT /api/v1/sync/tasks/:id/permissions。 UpdateTaskPermissions handles PUT /api/v1/sync/tasks/:id/permissions. @Summary 更新同步任务共享权限 @Tags Sync @Accept json @Produce json @Param id path int true "任务 ID" @Param request body UpdateTaskPermissionsRequest true "共享权限请求" @Success 200 {object} TaskPermissionsResponse @Failure 400 {object} TaskPermissionsResponse @Failure 403 {object} TaskPermissionsResponse @Failure 404 {object} TaskPermissionsResponse @Router /api/v1/sync/tasks/{id}/permissions [put]
func (*Handler) ValidateTask ¶
ValidateTask handles POST /api/v1/sync/tasks/:id/validate.
type JSONMap ¶
type JSONMap map[string]interface{}
JSONMap represents JSON object payload stored in database. JSONMap 表示存储在数据库中的 JSON 对象载荷。
type JSONStringSlice ¶
type JSONStringSlice []string
JSONStringSlice represents one JSON-encoded string array. JSONStringSlice 表示一个 JSON 编码的字符串数组。
func (*JSONStringSlice) Scan ¶
func (s *JSONStringSlice) Scan(value interface{}) error
Scan implements the sql.Scanner interface. Scan 实现 sql.Scanner 接口。
type JobCDCDelay ¶ added in v1.3.0
type JobCDCDelay struct {
LatestMs int64 `json:"latest_ms"`
MaxMs int64 `json:"max_1m_ms"`
At time.Time `json:"at"`
Fresh bool `json:"fresh"`
}
JobCDCDelay 是作业最近的 CDC 发射延迟摘要(内存聚合,不落库)。 JobCDCDelay summarizes a job's recent CDC emit delay (aggregated in memory, never persisted).
type JobEventListResponse ¶ added in v1.3.0
type JobEventListResponse struct {
ErrorMsg string `json:"error_msg"`
Data *JobEventListResult `json:"data"`
}
JobEventListResponse 包装作业事件时间线。 JobEventListResponse wraps the job event timeline.
type JobEventListResult ¶ added in v1.3.0
type JobEventListResult struct {
Total int64 `json:"total"`
Events []*EngineEvent `json:"events"`
}
JobEventListResult 是作业事件时间线的分页结果。 JobEventListResult is a paged job event timeline.
type JobFilter ¶
type JobFilter struct {
TaskID uint
RunType RunType
PlatformJobID string
EngineJobID string
OwnerUserID uint
IncludeAll bool
Page int
Size int
}
JobFilter represents job instance list query filters.
type JobIDGenerator ¶
type JobIDGenerator struct {
// contains filtered or unexported fields
}
JobIDGenerator generates platform-owned numeric job ids. JobIDGenerator 生成平台自管的纯数字作业 ID。
func NewJobIDGenerator ¶
func NewJobIDGenerator() *JobIDGenerator
NewJobIDGenerator creates a numeric job id generator. NewJobIDGenerator 创建纯数字作业 ID 生成器。
func (*JobIDGenerator) NextJobID ¶
func (g *JobIDGenerator) NextJobID() string
NextJobID returns a pure numeric job id string. NextJobID 返回纯数字字符串作业 ID。
type JobInstance ¶
type JobInstance struct {
ID uint `json:"id" gorm:"primaryKey;autoIncrement"`
ExecutionID string `json:"execution_id" gorm:"size:36;index"`
TaskID uint `json:"task_id" gorm:"index;not null"`
TaskVersion int `json:"task_version" gorm:"not null"`
RunType RunType `json:"run_type" gorm:"size:20;not null;index"`
PlatformJobID string `json:"platform_job_id" gorm:"size:32;index"`
EngineJobID string `json:"engine_job_id" gorm:"size:255;index"`
RecoveredFromInstanceID *uint `json:"recovered_from_instance_id,omitempty" gorm:"index"`
Status JobStatus `json:"status" gorm:"size:20;default:pending;index"`
// LastSyncedAt 记录最近一次成功向 SeaTunnel 对齐状态的时间(UTC)。
// LastSyncedAt is when STX last successfully synced runtime state from SeaTunnel (UTC).
LastSyncedAt *time.Time `json:"last_synced_at,omitempty"`
// SyncState 表示观察面新鲜度:ok / degraded / stale / unknown。
// SyncState indicates observation freshness: ok / degraded / stale / unknown.
SyncState JobSyncState `json:"sync_state" gorm:"size:20;default:unknown;index"`
// SyncFailCount 连续问引擎失败次数,成功对齐后归零。
// SyncFailCount counts consecutive engine sync failures; reset after a successful sync.
SyncFailCount int `json:"sync_fail_count" gorm:"not null;default:0"`
// SyncLagMs 由 API 根据 last_synced_at 派生,不落库。
// SyncLagMs is derived from last_synced_at at read time and is not persisted.
SyncLagMs int64 `json:"sync_lag_ms,omitempty" gorm:"-"`
// CancelOverdue 表示取消中作业已越过停止截止时间,由 API 派生,不落库。
// CancelOverdue reports a cancelling job past its stop deadline; derived at read time and not persisted.
CancelOverdue bool `json:"cancel_overdue,omitempty" gorm:"-"`
// Mode 从提交快照回填,供 CLI --wait 区分批任务和实时任务,不落库。
// Mode is copied from the submit snapshot so CLI --wait can tell batch from streaming; it is not persisted.
Mode string `json:"mode,omitempty" gorm:"-"`
SubmitSpec JSONMap `json:"submit_spec" gorm:"type:json"`
ResultPreview JSONMap `json:"result_preview" gorm:"type:json"`
ErrorMessage string `json:"error_message" gorm:"type:text"`
StartedAt *time.Time `json:"started_at"`
FinishedAt *time.Time `json:"finished_at"`
CreatedBy uint `json:"created_by"`
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"`
// ExternalRef 记录外部调度器这次运行的引用,例如 ds:{工作流实例}:{节点 code}。
// ExternalRef stores the external scheduler run identity such as ds:{workflowInstance}:{taskCode}.
ExternalRef string `json:"external_ref,omitempty" gorm:"size:255;index"`
// AttachGeneration 在同一 external_ref 被 CLI 接管时递增,用来忽略过期停止请求。
// AttachGeneration increments when another CLI attaches to the same external_ref so stale cancel requests are ignored.
AttachGeneration int `json:"attach_generation" gorm:"not null;default:0"`
// CDCDelay 是事件通道聚合的 CDC 延迟摘要(内存态,响应时补充,不落库)。
// CDCDelay is the CDC delay summary aggregated from the event channel (in memory, filled at response time).
CDCDelay *JobCDCDelay `json:"cdc_delay,omitempty" gorm:"-"`
}
JobInstance stores one preview/run/recover execution instance. JobInstance 存储一次预览/运行/恢复执行实例。
func (JobInstance) TableName ¶
func (JobInstance) TableName() string
TableName returns the sync job instance table name. TableName 返回同步作业实例表名。
type JobListData ¶
type JobListData struct {
Total int64 `json:"total"`
Items []*JobInstance `json:"items"`
}
JobListData represents job list response data.
type JobListResponse ¶
type JobListResponse struct {
ErrorMsg string `json:"error_msg"`
Data *JobListData `json:"data"`
}
type JobLogsResponse ¶
type JobLogsResponse struct {
ErrorMsg string `json:"error_msg"`
Data *JobLogsResult `json:"data"`
}
type JobLogsResult ¶
type JobLogsResult struct {
Mode string `json:"mode"`
Source string `json:"source"`
Logs string `json:"logs"`
// MetricsLog 为基于 result_preview.metrics 的最新可读快照,不计入 offset。
// MetricsLog is the latest human-readable metrics snapshot from result_preview; not covered by offset.
MetricsLog string `json:"metrics_log,omitempty"`
EmptyReason string `json:"empty_reason,omitempty"`
ClusterJobLogMode string `json:"cluster_job_log_mode,omitempty"`
ClusterID uint `json:"cluster_id,omitempty"`
NextOffset string `json:"next_offset,omitempty"`
FileSize int64 `json:"file_size,omitempty"`
UpdatedAt string `json:"updated_at"`
}
type JobPlanDAGResponse ¶ added in v1.3.0
type JobPlanDAGResponse struct {
ErrorMsg string `json:"error_msg"`
Data *JobPlanDAGResult `json:"data"`
}
JobPlanDAGResponse 包装作业计划 DAG 结果。 JobPlanDAGResponse wraps the job plan DAG result.
type JobPlanDAGResult ¶ added in v1.3.0
type JobPlanDAGResult struct {
JobID uint `json:"job_id"`
Available bool `json:"available"`
Reason string `json:"reason"`
// Message 只在 inspect_failed 时出现,已脱敏并截断。
// Message is only set for inspect_failed, already redacted and truncated.
Message string `json:"message,omitempty"`
// WebUIJob 与 /tasks/:id/dag 的 webui_job 同构(WebUI 兼容 jobDag),前端用同一套解析。
// WebUIJob has the same shape as webui_job from /tasks/:id/dag (WebUI-compatible jobDag), parsed by the same code.
WebUIJob JSONMap `json:"webui_job,omitempty"`
// Warnings 永远是数组,不为 null。
// Warnings is always an array, never null.
Warnings []string `json:"warnings"`
}
JobPlanDAGResult 是作业提交时配置推导出的计划 DAG:表结构、列与建表计划,用来补齐引擎运行时 DAG 缺少的信息。 JobPlanDAGResult is the plan DAG derived from the job's submitted config: table schemas, columns and save-mode plans that fill in what the engine's runtime DAG lacks.
type JobRealtimeResponse ¶ added in v1.3.0
type JobRealtimeResponse struct {
ErrorMsg string `json:"error_msg"`
Data *JobRealtimeResult `json:"data"`
}
JobRealtimeResponse 包装作业实时指标结果。 JobRealtimeResponse wraps the job realtime metrics result.
type JobRealtimeResult ¶ added in v1.3.0
type JobRealtimeResult struct {
Available bool `json:"available"`
Reason string `json:"reason"`
JobID uint `json:"job_id"`
EngineJobID string `json:"engine_job_id"`
ClusterID uint `json:"cluster_id"`
BucketMs int64 `json:"bucket_ms"`
WindowMs int64 `json:"window_ms"`
FromMs int64 `json:"from_ms"`
ToMs int64 `json:"to_ms"`
FetchedAtMs int64 `json:"fetched_at_ms"`
WebUIPath string `json:"webui_path"`
Observability JSONMap `json:"observability"`
Vertices []RealtimeVertex `json:"vertices"`
Edges []RealtimeEdge `json:"edges"`
Hints []RealtimeHint `json:"hints"`
}
JobRealtimeResult 是 GET /api/v1/sync/jobs/:id/realtime 的返回。引擎侧失败都用 available=false 加 reason 表达。 JobRealtimeResult is the payload of GET /api/v1/sync/jobs/:id/realtime. Engine-side failures are expressed as available=false plus a reason.
type JobResponse ¶
type JobResponse struct {
ErrorMsg string `json:"error_msg"`
Data *JobInstance `json:"data"`
}
type JobStatus ¶
type JobStatus string
JobStatus represents sync job instance status. JobStatus 表示同步作业实例状态。
const ( JobStatusPending JobStatus = "pending" JobStatusRunning JobStatus = "running" JobStatusCancelRequested JobStatus = "cancel_requested" JobStatusCancelling JobStatus = "cancelling" // JobStatusDoingSavepoint mirrors SeaTunnel DOING_SAVEPOINT (stop-with-savepoint in progress). // JobStatusDoingSavepoint 对应引擎 DOING_SAVEPOINT(带 Savepoint 停止进行中)。 JobStatusDoingSavepoint JobStatus = "doing_savepoint" // JobStatusFailing mirrors SeaTunnel FAILING (transitioning to FAILED). // JobStatusFailing 对应引擎 FAILING(正在失败、尚未 FAILED)。 JobStatusFailing JobStatus = "failing" JobStatusSuccess JobStatus = "success" JobStatusFailed JobStatus = "failed" JobStatusCanceled JobStatus = "canceled" // JobStatusSavepointDone mirrors SeaTunnel SAVEPOINT_DONE (terminal after savepoint stop). // JobStatusSavepointDone 对应引擎 SAVEPOINT_DONE(Savepoint 停止完成的终态)。 JobStatusSavepointDone JobStatus = "savepoint_done" )
type JobSyncState ¶ added in v1.2.0
type JobSyncState string
JobSyncState 描述 STX 与 SeaTunnel 引擎状态对齐的新鲜度,不等同于作业生命周期 status。 JobSyncState describes how fresh STX's cached engine view is; it is not the job lifecycle status.
const ( JobSyncStateOK JobSyncState = "ok" JobSyncStateDegraded JobSyncState = "degraded" JobSyncStateStale JobSyncState = "stale" JobSyncStateUnknown JobSyncState = "unknown" )
type JobTimeseriesAnnotation ¶ added in v1.3.0
type JobTimeseriesAnnotation struct {
TsMs int64 `json:"ts_ms"`
Kind string `json:"kind"`
Summary string `json:"summary"`
EventID uint `json:"event_id,omitempty"`
}
JobTimeseriesAnnotation 是叠加在图上的事件标记。 JobTimeseriesAnnotation is an event marker overlaid on the charts.
type JobTimeseriesResponse ¶ added in v1.3.0
type JobTimeseriesResponse struct {
ErrorMsg string `json:"error_msg"`
Data *JobTimeseriesResult `json:"data"`
}
JobTimeseriesResponse 包装作业时序查询结果。 JobTimeseriesResponse wraps the job timeseries query result.
type JobTimeseriesResult ¶ added in v1.3.0
type JobTimeseriesResult struct {
Source string `json:"source"`
Reason string `json:"reason,omitempty"`
Range string `json:"range"`
StepSeconds int `json:"step_seconds"`
EngineObservabilityEnabled bool `json:"engine_observability_enabled"`
Series []JobTimeseriesSeries `json:"series"`
Annotations []JobTimeseriesAnnotation `json:"annotations"`
}
JobTimeseriesResult 是 GET /sync/jobs/:id/timeseries 的返回;无本地兜底,source 仅为 prometheus 或 none。 JobTimeseriesResult is the payload of GET /sync/jobs/:id/timeseries; there is no local fallback, so source is only "prometheus" or "none".
type JobTimeseriesSeries ¶ added in v1.3.0
type JobTimeseriesSeries struct {
Key string `json:"key"`
Label string `json:"label"`
Unit string `json:"unit"`
Points [][2]float64 `json:"points"` // [ts_ms, value]
}
JobTimeseriesSeries 是一条命名时序。 JobTimeseriesSeries is one named time series.
type ListCuratedTemplatesRequest ¶ added in v1.0.0
type ListCuratedTemplatesRequest struct {
Section string `json:"section"`
Mode string `json:"mode"`
Q string `json:"q"`
Origin string `json:"origin"` // builtin|user|all
}
ListCuratedTemplatesRequest filters curated templates. ListCuratedTemplatesRequest 筛选精选模板列表。
type ListSyncPluginEnumValuesRequest ¶
type ListSyncPluginEnumValuesRequest struct {
ClusterID uint `json:"cluster_id" binding:"required"`
PluginType string `json:"plugin_type" binding:"required"`
FactoryIdentifier string `json:"factory_identifier" binding:"required"`
OptionKey string `json:"option_key" binding:"required"`
IncludeSupplement *bool `json:"include_supplement,omitempty"`
}
type LocalRunResponse ¶
type LocalStatusResponse ¶
type ParseCuratedComboRequest ¶ added in v1.0.0
type ParseCuratedComboRequest struct {
Content string `json:"content" binding:"required"`
}
ParseCuratedComboRequest parses job content into four sections for combo save. ParseCuratedComboRequest 将作业正文解析为四节,供一键组合另存。
type PluginEnumCatalogResponse ¶
type PluginEnumCatalogResponse struct {
ErrorMsg string `json:"error_msg"`
Data *SyncPluginEnumCatalogResult `json:"data"`
}
type PluginEnumValuesResponse ¶
type PluginEnumValuesResponse struct {
ErrorMsg string `json:"error_msg"`
Data *SyncPluginEnumValuesResult `json:"data"`
}
type PluginFactoryListResponse ¶
type PluginFactoryListResponse struct {
ErrorMsg string `json:"error_msg"`
Data *SyncPluginFactoryListResult `json:"data"`
}
type PluginOptionSchemaResponse ¶
type PluginOptionSchemaResponse struct {
ErrorMsg string `json:"error_msg"`
Data *SyncPluginOptionSchemaResult `json:"data"`
}
type PluginTemplateResponse ¶
type PluginTemplateResponse struct {
ErrorMsg string `json:"error_msg"`
Data *SyncPluginTemplateResult `json:"data"`
}
type PreviewCollectRequest ¶
type PreviewCollectRequest struct {
PlatformJobID string `json:"platform_job_id"`
EngineJobID string `json:"engine_job_id"`
Dataset string `json:"dataset"`
Catalog map[string]interface{} `json:"catalog"`
Columns []interface{} `json:"columns"`
Rows []map[string]interface{} `json:"rows"`
RowLimit int `json:"row_limit"`
Page int `json:"page"`
PageSize int `json:"page_size"`
Total int `json:"total"`
Replace bool `json:"replace"`
}
type PreviewRow ¶
type PreviewRow struct {
ID uint `json:"id" gorm:"primaryKey;autoIncrement"`
SessionID uint `json:"session_id" gorm:"index;not null"`
TableID uint `json:"table_id" gorm:"index;not null"`
RowIndex int `json:"row_index" gorm:"index;not null"`
RowData JSONMap `json:"row_data" gorm:"type:json"`
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
}
PreviewRow stores one preview data row. PreviewRow 存储一条预览数据行。
func (PreviewRow) TableName ¶
func (PreviewRow) TableName() string
TableName returns the preview row table name. TableName 返回预览数据行表名。
type PreviewSession ¶
type PreviewSession struct {
ID uint `json:"id" gorm:"primaryKey;autoIncrement"`
JobInstanceID uint `json:"job_instance_id" gorm:"uniqueIndex;not null"`
TaskID uint `json:"task_id" gorm:"index;not null"`
PlatformJobID string `json:"platform_job_id" gorm:"size:32;index"`
EngineJobID string `json:"engine_job_id" gorm:"size:255;index"`
RowLimit int `json:"row_limit" gorm:"not null;default:100"`
TimeoutMinutes int `json:"timeout_minutes" gorm:"not null;default:10"`
Status string `json:"status" gorm:"size:32;not null;default:collecting;index"`
TotalRows int `json:"total_rows" gorm:"not null;default:0"`
TableCount int `json:"table_count" gorm:"not null;default:0"`
Truncated bool `json:"truncated" gorm:"not null;default:false"`
LastError string `json:"last_error" gorm:"type:text"`
StartedAt *time.Time `json:"started_at"`
FinishedAt *time.Time `json:"finished_at"`
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"`
}
PreviewSession stores one incremental preview session snapshot. PreviewSession 存储一次增量预览会话快照。
func (PreviewSession) TableName ¶
func (PreviewSession) TableName() string
TableName returns the preview session table name. TableName 返回预览会话表名。
type PreviewSnapshot ¶
type PreviewSnapshot struct {
SessionID uint `json:"session_id"`
JobInstanceID uint `json:"job_instance_id"`
PlatformJobID string `json:"platform_job_id"`
EngineJobID string `json:"engine_job_id"`
Status string `json:"status"`
EmptyReason string `json:"empty_reason,omitempty"`
RowLimit int `json:"row_limit"`
TimeoutMinutes int `json:"timeout_minutes"`
TotalRows int `json:"total_rows"`
TableCount int `json:"table_count"`
Truncated bool `json:"truncated"`
InjectedScript string `json:"injected_script,omitempty"`
ContentFormat string `json:"content_format,omitempty"`
Tables []*PreviewTableData `json:"tables"`
SelectedTable *PreviewTableData `json:"selected_table,omitempty"`
Warnings []string `json:"warnings,omitempty"`
}
PreviewSnapshot represents one incremental preview snapshot payload. PreviewSnapshot 表示一次增量预览快照返回。
type PreviewSnapshotResponse ¶
type PreviewSnapshotResponse struct {
ErrorMsg string `json:"error_msg"`
Data *PreviewSnapshot `json:"data"`
}
type PreviewSyncSinkSaveModeRequest ¶
type PreviewSyncSinkSaveModeRequest struct {
ClusterID uint `json:"cluster_id" binding:"required"`
SinkIndex *int `json:"sink_index,omitempty"`
SinkNodeID string `json:"sink_node_id,omitempty"`
IncludeInfoPreview *bool `json:"include_info_preview,omitempty"`
Draft *TaskDraftPayload `json:"draft,omitempty"`
}
type PreviewTable ¶
type PreviewTable struct {
ID uint `json:"id" gorm:"primaryKey;autoIncrement"`
SessionID uint `json:"session_id" gorm:"index;not null"`
TablePath string `json:"table_path" gorm:"size:512;index;not null"`
DisplayName string `json:"display_name" gorm:"size:512"`
Columns JSONStringSlice `json:"columns" gorm:"type:json"`
RowCount int `json:"row_count" gorm:"not null;default:0"`
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"`
}
PreviewTable stores one preview table group under a session. PreviewTable 存储预览会话中的一张表分组。
func (PreviewTable) TableName ¶
func (PreviewTable) TableName() string
TableName returns the preview table table name. TableName 返回预览表分组表名。
type PreviewTableData ¶
type PreviewTableData struct {
ID uint `json:"id"`
TablePath string `json:"table_path"`
Columns []string `json:"columns"`
RowCount int `json:"row_count"`
Rows []map[string]interface{} `json:"rows,omitempty"`
}
PreviewTableData represents one table group inside a preview snapshot. PreviewTableData 表示预览快照中的单张表数据。
type PreviewTaskRequest ¶
type PreviewTaskRequest struct {
RowLimit int `json:"row_limit"`
TimeoutMinutes int `json:"timeout_minutes"`
SourceNodeID string `json:"source_node_id,omitempty"`
SourceIndex *int `json:"source_index,omitempty"`
TransformNodeID string `json:"transform_node_id,omitempty"`
TransformIndex *int `json:"transform_index,omitempty"`
Mode string `json:"mode,omitempty"`
Draft *TaskDraftPayload `json:"draft,omitempty"`
}
PreviewTaskRequest represents optional preview execution parameters.
type PublishTaskRequest ¶
type PublishTaskRequest struct {
Comment string `json:"comment"`
}
PublishTaskRequest represents the payload for publishing a sync task.
type RealtimeEdge ¶ added in v1.3.0
type RealtimeEdge struct {
QueueID int64 `json:"queue_id"`
TargetVertexID int64 `json:"target_vertex_id"`
Points []map[string]any `json:"points"`
}
RealtimeEdge 是一条带中间队列的边的时间序列。 RealtimeEdge is one queue-backed edge time series.
type RealtimeHint ¶ added in v1.3.0
type RealtimeHint struct {
Code string `json:"code"`
Severity string `json:"severity"`
VertexID *int64 `json:"vertex_id,omitempty"`
QueueID *int64 `json:"queue_id,omitempty"`
Buckets int `json:"buckets"`
Value float64 `json:"value"`
}
RealtimeHint 是一条瓶颈提示;文案由前端按 code 本地化。 RealtimeHint is one bottleneck hint; the frontend localizes it by code.
type RealtimeVertex ¶ added in v1.3.0
type RealtimeVertex struct {
VertexID int64 `json:"vertex_id"`
Type string `json:"type"`
Name string `json:"name"`
Points []map[string]any `json:"points"`
}
RealtimeVertex 是一个 DAG 节点的时间序列,type/name 来自作业 DAG。 RealtimeVertex is one DAG vertex time series; type/name come from the job DAG.
type RecoverJobRequest ¶
type RecoverJobRequest struct {
Draft *TaskDraftPayload `json:"draft,omitempty"`
}
RecoverJobRequest represents a recover request with an optional unsaved task draft.
type RecoverTaskRequest ¶
type RecoverTaskRequest struct {
Comment string `json:"comment,omitempty"`
}
RecoverTaskRequest represents the payload for recovering from one previous job.
type RenderSyncPluginTemplateRequest ¶
type RenderSyncPluginTemplateRequest struct {
ClusterID uint `json:"cluster_id" binding:"required"`
PluginType string `json:"plugin_type" binding:"required"`
FactoryIdentifier string `json:"factory_identifier" binding:"required"`
IncludeSupplement *bool `json:"include_supplement,omitempty"`
IncludeComments *bool `json:"include_comments,omitempty"`
IncludeAdvanced *bool `json:"include_advanced,omitempty"`
}
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository provides persistence operations for sync tasks and instances.
func NewRepository ¶
func NewRepository(db *gorm.DB) *Repository
NewRepository creates a new sync repository.
func (*Repository) BumpEngineEventDelayIfGreater ¶ added in v1.3.0
func (r *Repository) BumpEngineEventDelayIfGreater(ctx context.Context, events []*EngineEvent) (int, error)
BumpEngineEventDelayIfGreater 在同一分钟桶已有 READER_MESSAGE_DELAYED 时,若新样本延迟更大则更新 payload.delay_ms, 避免跨批次入库时只保留第一批、界面时间线系统性低估。返回实际更新的行数。 BumpEngineEventDelayIfGreater updates payload.delay_ms when an existing READER_MESSAGE_DELAYED minute bucket has a smaller delay, so later batches do not leave the timeline stuck on the first sample. Returns how many rows changed.
func (*Repository) CreateCuratedTemplate ¶ added in v1.0.0
func (r *Repository) CreateCuratedTemplate(ctx context.Context, item *CuratedTemplate) error
CreateCuratedTemplate creates one curated template row. CreateCuratedTemplate 创建一条精选模板。
func (*Repository) CreateGlobalVariable ¶
func (r *Repository) CreateGlobalVariable(ctx context.Context, item *GlobalVariable) error
CreateGlobalVariable creates one global variable.
func (*Repository) CreateJobInstance ¶
func (r *Repository) CreateJobInstance(ctx context.Context, instance *JobInstance) error
CreateJobInstance creates a new job instance record.
func (*Repository) CreatePreviewRows ¶
func (r *Repository) CreatePreviewRows(ctx context.Context, rows []*PreviewRow) error
CreatePreviewRows appends preview rows in batch. CreatePreviewRows 批量追加预览数据行。
func (*Repository) CreatePreviewSession ¶
func (r *Repository) CreatePreviewSession(ctx context.Context, session *PreviewSession) error
CreatePreviewSession creates one preview session. CreatePreviewSession 创建一条预览会话记录。
func (*Repository) CreatePreviewTable ¶
func (r *Repository) CreatePreviewTable(ctx context.Context, table *PreviewTable) error
CreatePreviewTable creates one preview table. CreatePreviewTable 创建一条预览表记录。
func (*Repository) CreateSchedulerConnection ¶ added in v1.2.0
func (r *Repository) CreateSchedulerConnection(ctx context.Context, item *SchedulerConnection) error
CreateSchedulerConnection 保存一条调度器连接。 CreateSchedulerConnection stores one scheduler connection.
func (*Repository) CreateTask ¶
func (r *Repository) CreateTask(ctx context.Context, task *Task) error
CreateTask creates a sync task.
func (*Repository) CreateTaskVersion ¶
func (r *Repository) CreateTaskVersion(ctx context.Context, version *TaskVersion) error
CreateTaskVersion stores one immutable task snapshot.
func (*Repository) DeleteCuratedTemplate ¶ added in v1.0.0
func (r *Repository) DeleteCuratedTemplate(ctx context.Context, id uint) error
DeleteCuratedTemplate deletes one curated template by id. DeleteCuratedTemplate 按 id 删除精选模板。
func (*Repository) DeleteGlobalVariable ¶
func (r *Repository) DeleteGlobalVariable(ctx context.Context, id uint) error
DeleteGlobalVariable deletes one global variable.
func (*Repository) DeleteJobInstancesByTaskIDs ¶
func (r *Repository) DeleteJobInstancesByTaskIDs(ctx context.Context, taskIDs []uint) error
DeleteJobInstancesByTaskIDs deletes run history for the provided task ids.
func (*Repository) DeletePreviewRowsBySessionIDs ¶
func (r *Repository) DeletePreviewRowsBySessionIDs(ctx context.Context, sessionIDs []uint) error
DeletePreviewRowsBySessionIDs deletes preview rows for sessions. DeletePreviewRowsBySessionIDs 删除指定会话的预览数据行。
func (*Repository) DeletePreviewRowsByTableID ¶
func (r *Repository) DeletePreviewRowsByTableID(ctx context.Context, tableID uint) error
DeletePreviewRowsByTableID deletes preview rows by table. DeletePreviewRowsByTableID 按表删除预览数据行。
func (*Repository) DeletePreviewRowsByTaskIDs ¶
func (r *Repository) DeletePreviewRowsByTaskIDs(ctx context.Context, taskIDs []uint) error
DeletePreviewRowsByTaskIDs deletes preview rows for the provided task ids. DeletePreviewRowsByTaskIDs 删除指定任务的预览数据行。
func (*Repository) DeletePreviewSessionsByIDs ¶
func (r *Repository) DeletePreviewSessionsByIDs(ctx context.Context, sessionIDs []uint) error
DeletePreviewSessionsByIDs deletes preview sessions by ids. DeletePreviewSessionsByIDs 删除指定预览会话。
func (*Repository) DeletePreviewSessionsByTaskIDs ¶
func (r *Repository) DeletePreviewSessionsByTaskIDs(ctx context.Context, taskIDs []uint) error
DeletePreviewSessionsByTaskIDs deletes preview sessions for the provided task ids. DeletePreviewSessionsByTaskIDs 删除指定任务的预览会话。
func (*Repository) DeletePreviewTablesBySessionIDs ¶
func (r *Repository) DeletePreviewTablesBySessionIDs(ctx context.Context, sessionIDs []uint) error
DeletePreviewTablesBySessionIDs deletes preview tables for sessions. DeletePreviewTablesBySessionIDs 删除指定会话的预览表。
func (*Repository) DeletePreviewTablesByTaskIDs ¶
func (r *Repository) DeletePreviewTablesByTaskIDs(ctx context.Context, taskIDs []uint) error
DeletePreviewTablesByTaskIDs deletes preview tables for the provided task ids. DeletePreviewTablesByTaskIDs 删除指定任务的预览表分组。
func (*Repository) DeleteSchedulerBindingByTaskID ¶ added in v1.2.0
func (r *Repository) DeleteSchedulerBindingByTaskID(ctx context.Context, taskID uint) error
DeleteSchedulerBindingByTaskID 删除任务绑定,不影响 Dolphin 侧节点。 DeleteSchedulerBindingByTaskID removes the STX binding without touching the Dolphin node.
func (*Repository) DeleteSchedulerConnection ¶ added in v1.2.0
func (r *Repository) DeleteSchedulerConnection(ctx context.Context, id uint) error
DeleteSchedulerConnection 删除调度器连接。 DeleteSchedulerConnection deletes a scheduler connection.
func (*Repository) DeleteTaskVersion ¶
DeleteTaskVersion removes one immutable task snapshot.
func (*Repository) DeleteTaskVersionsByTaskIDs ¶
func (r *Repository) DeleteTaskVersionsByTaskIDs(ctx context.Context, taskIDs []uint) error
DeleteTaskVersionsByTaskIDs deletes snapshots for the provided task ids.
func (*Repository) DeleteTasksByIDs ¶
func (r *Repository) DeleteTasksByIDs(ctx context.Context, taskIDs []uint) error
DeleteTasksByIDs deletes the provided workspace nodes.
func (*Repository) ExistingEngineEventDedupeKeys ¶ added in v1.3.0
func (r *Repository) ExistingEngineEventDedupeKeys(ctx context.Context, keys []string) (map[string]bool, error)
ExistingEngineEventDedupeKeys 返回已入库的去重键集合,用于判断一批事件里哪些是新的。 ExistingEngineEventDedupeKeys returns which dedupe keys are already stored so a batch can tell new events apart.
func (*Repository) ExistsSiblingTaskName ¶
func (r *Repository) ExistsSiblingTaskName(ctx context.Context, parentID *uint, name string, excludeID *uint) (bool, error)
ExistsSiblingTaskName reports whether the same folder already contains a node with the provided name. ExistsSiblingTaskName 返回同级目录下是否已存在同名节点。
func (*Repository) FindLatestJobInstanceByEngineJobID ¶ added in v1.3.0
func (r *Repository) FindLatestJobInstanceByEngineJobID(ctx context.Context, engineJobID string) (*JobInstance, error)
FindLatestJobInstanceByEngineJobID 按引擎作业 ID 找最新的作业实例(恢复作业会复用同一个引擎作业 ID)。 FindLatestJobInstanceByEngineJobID finds the newest job instance for an engine job ID (recovered jobs reuse the engine job ID).
func (*Repository) GetActiveJobByExternalRef ¶ added in v1.2.0
func (r *Repository) GetActiveJobByExternalRef(ctx context.Context, ref string) (*JobInstance, error)
GetActiveJobByExternalRef 返回同一外部引用上仍在运行或停止中的作业。 GetActiveJobByExternalRef returns the in-flight job that currently owns the external reference.
func (*Repository) GetCuratedTemplateByID ¶ added in v1.0.0
func (r *Repository) GetCuratedTemplateByID(ctx context.Context, id uint) (*CuratedTemplate, error)
GetCuratedTemplateByID returns one curated template by id. GetCuratedTemplateByID 按 id 返回精选模板。
func (*Repository) GetCuratedTemplateByOwnerAndBuiltin ¶ added in v1.0.0
func (r *Repository) GetCuratedTemplateByOwnerAndBuiltin(ctx context.Context, ownerUserID uint, builtinID string) (*CuratedTemplate, error)
GetCuratedTemplateByOwnerAndBuiltin returns override row for one builtin id. GetCuratedTemplateByOwnerAndBuiltin 返回用户对某内置 id 的副本行。
func (*Repository) GetEngineEventChannel ¶ added in v1.3.0
func (r *Repository) GetEngineEventChannel(ctx context.Context, clusterID uint) (*EngineEventChannel, error)
GetEngineEventChannel 读取集群的事件通道记录,不存在时返回 ErrEventChannelNotFound。 GetEngineEventChannel reads a cluster event channel record and returns ErrEventChannelNotFound when absent.
func (*Repository) GetGlobalVariableByID ¶
func (r *Repository) GetGlobalVariableByID(ctx context.Context, id uint) (*GlobalVariable, error)
GetGlobalVariableByID returns one global variable by id.
func (*Repository) GetGlobalVariableByKey ¶
func (r *Repository) GetGlobalVariableByKey(ctx context.Context, key string) (*GlobalVariable, error)
GetGlobalVariableByKey returns one global variable by key.
func (*Repository) GetJobInstanceByID ¶
func (r *Repository) GetJobInstanceByID(ctx context.Context, id uint) (*JobInstance, error)
GetJobInstanceByID returns one job instance by id.
func (*Repository) GetJobInstanceByIDForOwner ¶
func (r *Repository) GetJobInstanceByIDForOwner(ctx context.Context, id, ownerUserID uint, includeAll bool) (*JobInstance, error)
GetJobInstanceByIDForOwner 按用户归属读取作业实例,管理员可跳过归属限制。 GetJobInstanceByIDForOwner loads a job instance under owner scope, while administrators may bypass the owner filter.
func (*Repository) GetLatestScheduledJobInstancesByTaskIDs ¶
func (r *Repository) GetLatestScheduledJobInstancesByTaskIDs(ctx context.Context, taskIDs []uint) (map[uint]*JobInstance, error)
GetLatestScheduledJobInstancesByTaskIDs returns the latest scheduled job instance keyed by task id.
func (*Repository) GetPreviewJobInstanceByPlatformOrEngineJobID ¶
func (r *Repository) GetPreviewJobInstanceByPlatformOrEngineJobID(ctx context.Context, platformJobID string, engineJobID string) (*JobInstance, error)
GetPreviewJobInstanceByPlatformOrEngineJobID retrieves one preview job by platform or engine job id.
func (*Repository) GetPreviewSessionByJobInstanceID ¶
func (r *Repository) GetPreviewSessionByJobInstanceID(ctx context.Context, jobInstanceID uint) (*PreviewSession, error)
GetPreviewSessionByJobInstanceID returns the preview session for one job instance. GetPreviewSessionByJobInstanceID 返回指定作业实例的预览会话。
func (*Repository) GetPreviewTableByPath ¶
func (r *Repository) GetPreviewTableByPath(ctx context.Context, sessionID uint, tablePath string) (*PreviewTable, error)
GetPreviewTableByPath returns one preview table by session and table path. GetPreviewTableByPath 按会话和表路径返回一条预览表记录。
func (*Repository) GetSchedulerBindingByTaskID ¶ added in v1.2.0
func (r *Repository) GetSchedulerBindingByTaskID(ctx context.Context, taskID uint) (*TaskSchedulerBinding, error)
GetSchedulerBindingByTaskID 读取任务的 Dolphin 绑定。 GetSchedulerBindingByTaskID loads the Dolphin binding for a task.
func (*Repository) GetSchedulerConnectionByID ¶ added in v1.2.0
func (r *Repository) GetSchedulerConnectionByID(ctx context.Context, id uint) (*SchedulerConnection, error)
GetSchedulerConnectionByID 按编号读取调度器连接。 GetSchedulerConnectionByID loads a scheduler connection by id.
func (*Repository) GetTaskByID ¶
GetTaskByID returns one task by id.
func (*Repository) GetTaskVersionByID ¶
func (r *Repository) GetTaskVersionByID(ctx context.Context, taskID uint, versionID uint) (*TaskVersion, error)
GetTaskVersionByID returns one immutable task snapshot.
func (*Repository) GetTaskVersionByVersion ¶
func (r *Repository) GetTaskVersionByVersion(ctx context.Context, taskID uint, version int) (*TaskVersion, error)
GetTaskVersionByVersion returns one immutable task snapshot by version number.
func (*Repository) HasScheduledJobInstanceInWindow ¶
func (r *Repository) HasScheduledJobInstanceInWindow(ctx context.Context, taskID uint, startedAt time.Time, finishedAt time.Time) (bool, error)
HasScheduledJobInstanceInWindow reports whether a scheduled job already exists in the target trigger window.
func (*Repository) InsertEngineEventsIgnoreDuplicates ¶ added in v1.3.0
func (r *Repository) InsertEngineEventsIgnoreDuplicates(ctx context.Context, events []*EngineEvent) error
InsertEngineEventsIgnoreDuplicates 批量写入事件,去重键冲突的行直接忽略(并发与重放安全)。 InsertEngineEventsIgnoreDuplicates bulk-inserts events and ignores rows whose dedupe key already exists (safe under concurrency and replays).
func (*Repository) ListAllTasks ¶
func (r *Repository) ListAllTasks(ctx context.Context) ([]*Task, error)
ListAllTasks returns all nodes for tree building.
func (*Repository) ListCuratedTemplatesByOwner ¶ added in v1.0.0
func (r *Repository) ListCuratedTemplatesByOwner(ctx context.Context, ownerUserID uint) ([]*CuratedTemplate, error)
ListCuratedTemplatesByOwner returns curated templates owned by one user. ListCuratedTemplatesByOwner 返回某用户拥有的精选模板。
func (*Repository) ListEngineEventChannels ¶ added in v1.3.0
func (r *Repository) ListEngineEventChannels(ctx context.Context) ([]*EngineEventChannel, error)
ListEngineEventChannels 列出全部事件通道记录。 ListEngineEventChannels lists all event channel records.
func (*Repository) ListEngineEventsByJob ¶ added in v1.3.0
func (r *Repository) ListEngineEventsByJob(ctx context.Context, jobInstanceID uint, eventTypes []string, page, size int) ([]*EngineEvent, int64, error)
ListEngineEventsByJob 按事件时间倒序分页列出某作业的事件,可按类型过滤。 ListEngineEventsByJob lists one job's events by event time descending with paging and optional type filters.
func (*Repository) ListExpiredPreviewSessions ¶
func (r *Repository) ListExpiredPreviewSessions(ctx context.Context, cutoff time.Time) ([]*PreviewSession, error)
ListExpiredPreviewSessions returns finished preview sessions older than cutoff. ListExpiredPreviewSessions 返回超过截止时间的已完成预览会话。
func (*Repository) ListGlobalVariables ¶
func (r *Repository) ListGlobalVariables(ctx context.Context) ([]*GlobalVariable, error)
ListGlobalVariables returns all global variables ordered by key.
func (*Repository) ListGlobalVariablesPaginated ¶
func (r *Repository) ListGlobalVariablesPaginated(ctx context.Context, page, size int) ([]*GlobalVariable, int64, error)
ListGlobalVariablesPaginated returns global variables ordered by key with pagination.
func (*Repository) ListJobInstances ¶
func (r *Repository) ListJobInstances(ctx context.Context, filter *JobFilter) ([]*JobInstance, int64, error)
ListJobInstances lists job instances with filter and pagination.
func (*Repository) ListNonTerminalJobInstances ¶ added in v1.2.0
func (r *Repository) ListNonTerminalJobInstances(ctx context.Context, limit int) ([]*JobInstance, error)
func (*Repository) ListPendingJobInstancesByTaskID ¶ added in v1.3.0
func (r *Repository) ListPendingJobInstancesByTaskID(ctx context.Context, taskID uint, limit int) ([]*JobInstance, error)
ListPendingJobInstancesByTaskID 列出任务下仍处于 pending 的作业,供"提交结果确认中"拦截使用。 ListPendingJobInstancesByTaskID lists a task's pending jobs for the "submit outcome still confirming" guard.
func (*Repository) ListPreviewRowsByTableID ¶
func (r *Repository) ListPreviewRowsByTableID(ctx context.Context, tableID uint, offset, limit int) ([]*PreviewRow, error)
ListPreviewRowsByTableID lists preview rows for one table with pagination. ListPreviewRowsByTableID 按表分页返回预览数据行。
func (*Repository) ListPreviewTablesBySessionID ¶
func (r *Repository) ListPreviewTablesBySessionID(ctx context.Context, sessionID uint) ([]*PreviewTable, error)
ListPreviewTablesBySessionID lists preview tables for one session. ListPreviewTablesBySessionID 返回一个会话下的预览表列表。
func (*Repository) ListRecentFailedJobsWithoutError ¶ added in v1.3.0
func (r *Repository) ListRecentFailedJobsWithoutError(ctx context.Context, since time.Time, limit int) ([]*JobInstance, error)
ListNonTerminalJobInstances 返回仍需与引擎对齐的作业实例。 ListNonTerminalJobInstances returns job instances that still need engine reconciliation. ListRecentFailedJobsWithoutError 返回 since 之后失败、错误信息仍为空且有引擎作业 ID 的作业,用于补拉引擎迟到的错误信息。 ListRecentFailedJobsWithoutError returns failed jobs finished after since with an empty error and an engine job id, used to backfill the engine's late error message.
func (*Repository) ListRecentJobsByExternalRefPrefix ¶ added in v1.2.0
func (r *Repository) ListRecentJobsByExternalRefPrefix(ctx context.Context, taskID uint, prefix string, limit int) ([]*JobInstance, error)
ListRecentJobsByExternalRefPrefix 列出任务上带外部引用的最近作业。 ListRecentJobsByExternalRefPrefix lists recent jobs for a task that carry an external reference.
func (*Repository) ListRecentTerminalJobInstances ¶ added in v1.2.0
func (r *Repository) ListRecentTerminalJobInstances(ctx context.Context, limit int, since time.Time) ([]*JobInstance, error)
ListRecentTerminalJobInstances 返回近期已终态且仍带引擎作业 ID 的实例(用于补拉终态指标)。 ListRecentTerminalJobInstances returns recently finished job instances that still have an engine job id (for final metrics backfill).
func (*Repository) ListSchedulerConnections ¶ added in v1.2.0
func (r *Repository) ListSchedulerConnections(ctx context.Context) ([]*SchedulerConnection, error)
ListSchedulerConnections 列出全部调度器连接。 ListSchedulerConnections lists every scheduler connection.
func (*Repository) ListTaskVersionsByTaskID ¶
func (r *Repository) ListTaskVersionsByTaskID(ctx context.Context, taskID uint) ([]*TaskVersion, error)
ListTaskVersionsByTaskID lists immutable snapshots for one task.
func (*Repository) ListTaskVersionsByTaskIDPaginated ¶
func (r *Repository) ListTaskVersionsByTaskIDPaginated(ctx context.Context, taskID uint, page, size int) ([]*TaskVersion, int64, error)
ListTaskVersionsByTaskIDPaginated lists immutable snapshots for one task with pagination.
func (*Repository) ListTasks ¶
func (r *Repository) ListTasks(ctx context.Context, filter *TaskFilter) ([]*Task, int64, error)
ListTasks lists tasks with filter and pagination.
func (*Repository) ListTimedOutPreviewSessions ¶
func (r *Repository) ListTimedOutPreviewSessions(ctx context.Context, now time.Time) ([]*PreviewSession, error)
ListTimedOutPreviewSessions returns collecting preview sessions that exceeded timeout. ListTimedOutPreviewSessions 返回超过超时时间仍在收集中预览会话。
func (*Repository) PurgeEngineEventsBefore ¶ added in v1.3.0
PurgeEngineEventsBefore 删除早于 cutoff 收到的事件。 PurgeEngineEventsBefore deletes events received before cutoff.
func (*Repository) SaveEngineEventChannel ¶ added in v1.3.0
func (r *Repository) SaveEngineEventChannel(ctx context.Context, channel *EngineEventChannel) error
SaveEngineEventChannel 按 cluster_id 插入或整体更新通道记录。 SaveEngineEventChannel inserts or fully updates a channel record keyed by cluster_id.
func (*Repository) SaveSchedulerBinding ¶ added in v1.2.0
func (r *Repository) SaveSchedulerBinding(ctx context.Context, item *TaskSchedulerBinding) error
SaveSchedulerBinding 创建或更新任务绑定。 SaveSchedulerBinding creates or updates a task binding.
func (*Repository) Transaction ¶
func (r *Repository) Transaction(ctx context.Context, fn func(tx *Repository) error) error
Transaction executes fn inside one database transaction.
func (*Repository) UpdateCuratedTemplate ¶ added in v1.0.0
func (r *Repository) UpdateCuratedTemplate(ctx context.Context, item *CuratedTemplate) error
UpdateCuratedTemplate updates one curated template row. UpdateCuratedTemplate 更新一条精选模板。
func (*Repository) UpdateEngineEventChannelStats ¶ added in v1.3.0
func (r *Repository) UpdateEngineEventChannelStats(ctx context.Context, clusterID uint, counters map[string]int64, fields map[string]any) error
UpdateEngineEventChannelStats 原子累加计数并更新时间字段,避免并发批次互相覆盖。 UpdateEngineEventChannelStats atomically adds counters and updates timestamps so concurrent batches do not overwrite each other.
func (*Repository) UpdateGlobalVariable ¶
func (r *Repository) UpdateGlobalVariable(ctx context.Context, item *GlobalVariable) error
UpdateGlobalVariable updates one global variable.
func (*Repository) UpdateJobInstance ¶
func (r *Repository) UpdateJobInstance(ctx context.Context, instance *JobInstance) error
UpdateJobInstance updates one job instance.
func (*Repository) UpdateJobStatus ¶
func (r *Repository) UpdateJobStatus(ctx context.Context, id uint, expected []JobStatus, updates map[string]any) error
UpdateJobStatus 使用旧状态条件更新作业,防止完成回调覆盖取消状态。 UpdateJobStatus updates a job under an expected-status condition so completion callbacks cannot overwrite cancellation state.
func (*Repository) UpdateJobSyncMetadata ¶ added in v1.2.0
func (r *Repository) UpdateJobSyncMetadata(ctx context.Context, id uint, updates map[string]any) error
UpdateJobSyncMetadata 更新作业观察字段,不参与 status 条件竞争。 UpdateJobSyncMetadata updates observation metadata without status CAS.
func (*Repository) UpdatePreviewSession ¶
func (r *Repository) UpdatePreviewSession(ctx context.Context, session *PreviewSession) error
UpdatePreviewSession updates one preview session. UpdatePreviewSession 更新一条预览会话。
func (*Repository) UpdatePreviewTable ¶
func (r *Repository) UpdatePreviewTable(ctx context.Context, table *PreviewTable) error
UpdatePreviewTable updates one preview table. UpdatePreviewTable 更新一条预览表记录。
func (*Repository) UpdateSchedulerConnection ¶ added in v1.2.0
func (r *Repository) UpdateSchedulerConnection(ctx context.Context, item *SchedulerConnection) error
UpdateSchedulerConnection 保存调度器连接的更新。 UpdateSchedulerConnection persists scheduler connection updates.
func (*Repository) UpdateTask ¶
func (r *Repository) UpdateTask(ctx context.Context, task *Task) error
UpdateTask updates a sync task.
type RunType ¶
type RunType string
RunType represents sync job instance run type. RunType 表示同步作业实例运行类型。
type SchedulerConnection ¶ added in v1.2.0
type SchedulerConnection struct {
ID uint `json:"id" gorm:"primaryKey;autoIncrement"`
Name string `json:"name" gorm:"size:120;not null"`
Kind string `json:"kind" gorm:"size:32;not null;index;default:dolphin"`
BaseURL string `json:"base_url" gorm:"size:512;not null"`
Token string `json:"-" gorm:"type:text"`
TokenSet bool `json:"token_set" gorm:"-"`
DefaultProjectCode int64 `json:"default_project_code"`
APIStyle string `json:"api_style" gorm:"size:32;not null;default:auto"`
// DolphinVersion 可选,例如 3.2.2 / 3.3.1;空则运行时探测 3.1/3.2 与 3.3+ 路径。
// DolphinVersion is optional, e.g. 3.2.2 / 3.3.1; empty means probe 3.1/3.2 vs 3.3+ paths at runtime.
DolphinVersion string `json:"dolphin_version,omitempty" gorm:"size:32"`
CreatedBy uint `json:"created_by"`
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"`
}
SchedulerConnection 保存访问外部调度器的 API 地址和令牌。 SchedulerConnection stores the API endpoint and token for an external scheduler.
func (*SchedulerConnection) MaskToken ¶ added in v1.2.0
func (c *SchedulerConnection) MaskToken()
MaskToken 把令牌从 API 响应当中去掉,只保留是否已配置。 MaskToken removes the raw token from API responses and only reports whether it is set.
func (SchedulerConnection) TableName ¶ added in v1.2.0
func (SchedulerConnection) TableName() string
TableName 指定调度器连接表名。 TableName specifies the scheduler connection table.
type SchedulerConnectionListData ¶ added in v1.2.0
type SchedulerConnectionListData struct {
Items []*SchedulerConnection `json:"items"`
}
SchedulerConnectionListData 是调度器连接列表。 SchedulerConnectionListData is the scheduler connection list payload.
type SchedulerConnectionListResponse ¶ added in v1.2.0
type SchedulerConnectionListResponse struct {
ErrorMsg string `json:"error_msg"`
Data *SchedulerConnectionListData `json:"data"`
}
type SchedulerConnectionRequest ¶ added in v1.2.0
type SchedulerConnectionRequest struct {
Name string `json:"name"`
Kind string `json:"kind"`
BaseURL string `json:"base_url"`
Token string `json:"token"`
DefaultProjectCode int64 `json:"default_project_code"`
APIStyle string `json:"api_style"`
DolphinVersion string `json:"dolphin_version"`
}
SchedulerConnectionRequest 创建或更新调度器连接。 SchedulerConnectionRequest creates or updates a scheduler connection.
type SchedulerConnectionResponse ¶ added in v1.2.0
type SchedulerConnectionResponse struct {
ErrorMsg string `json:"error_msg"`
Data *SchedulerConnection `json:"data"`
}
type SeaTunnelEngineClient ¶
type SeaTunnelEngineClient struct {
// contains filtered or unexported fields
}
SeaTunnelEngineClient is the default REST V2 engine client.
func NewSeaTunnelEngineClient ¶
func NewSeaTunnelEngineClient() *SeaTunnelEngineClient
NewSeaTunnelEngineClient 创建引擎客户端,HTTP 超时取 sync.engine_request_timeout_seconds(读写请求共用)。 NewSeaTunnelEngineClient creates the engine client; its HTTP timeout comes from sync.engine_request_timeout_seconds and is shared by read and write calls.
func (*SeaTunnelEngineClient) GetJobCheckpointHistory ¶
func (c *SeaTunnelEngineClient) GetJobCheckpointHistory(ctx context.Context, endpoint *EngineEndpoint, jobID string, pipelineID *int, limit int, status string) ([]*EngineCheckpointRecord, error)
GetJobCheckpointHistory fetches job checkpoint history from REST V2.
func (*SeaTunnelEngineClient) GetJobCheckpointOverview ¶
func (c *SeaTunnelEngineClient) GetJobCheckpointOverview(ctx context.Context, endpoint *EngineEndpoint, jobID string) (*EngineCheckpointOverview, error)
GetJobCheckpointOverview fetches one job checkpoint overview from REST V2.
func (*SeaTunnelEngineClient) GetJobInfo ¶
func (c *SeaTunnelEngineClient) GetJobInfo(ctx context.Context, endpoint *EngineEndpoint, jobID string) (*EngineJobInfo, error)
GetJobInfo fetches one job info.
func (*SeaTunnelEngineClient) GetJobLogs ¶
func (c *SeaTunnelEngineClient) GetJobLogs(ctx context.Context, endpoint *EngineEndpoint, jobID string) (string, error)
GetJobLogs fetches one job log payload through SeaTunnel REST APIs.
func (*SeaTunnelEngineClient) GetRealtimeEdges ¶ added in v1.3.0
func (c *SeaTunnelEngineClient) GetRealtimeEdges(ctx context.Context, endpoint *EngineEndpoint, jobID string, windowMs int64) (*EngineRealtimeSeries, error)
GetRealtimeEdges 请求某作业的边(队列)时间序列。 GetRealtimeEdges fetches edge (queue) time series for one job.
func (*SeaTunnelEngineClient) GetRealtimeJobs ¶ added in v1.3.0
func (c *SeaTunnelEngineClient) GetRealtimeJobs(ctx context.Context, endpoint *EngineEndpoint) (*EngineRealtimeJobs, error)
GetRealtimeJobs 请求 /metrics/realtime/jobs,也用来探测节点是否为 active master。 GetRealtimeJobs calls /metrics/realtime/jobs; it doubles as the active-master probe.
func (*SeaTunnelEngineClient) GetRealtimeVertices ¶ added in v1.3.0
func (c *SeaTunnelEngineClient) GetRealtimeVertices(ctx context.Context, endpoint *EngineEndpoint, jobID string, windowMs int64) (*EngineRealtimeSeries, error)
GetRealtimeVertices 请求某作业的节点时间序列。 GetRealtimeVertices fetches vertex time series for one job.
func (*SeaTunnelEngineClient) ListFinishedJobs ¶ added in v1.2.0
func (c *SeaTunnelEngineClient) ListFinishedJobs(ctx context.Context, endpoint *EngineEndpoint, state string) ([]*EngineJobListItem, error)
ListFinishedJobs 拉取已完成作业列表,state 为空时尝试不带状态的路径。 ListFinishedJobs fetches finished jobs; when state is empty a path without state is tried first.
func (*SeaTunnelEngineClient) ListRunningJobs ¶ added in v1.2.0
func (c *SeaTunnelEngineClient) ListRunningJobs(ctx context.Context, endpoint *EngineEndpoint) ([]*EngineJobListItem, error)
ListRunningJobs 拉取当前运行中的作业列表。 ListRunningJobs fetches all currently running jobs from the engine.
func (*SeaTunnelEngineClient) StopJob ¶
func (c *SeaTunnelEngineClient) StopJob(ctx context.Context, endpoint *EngineEndpoint, jobID string, stopWithSavepoint bool) error
StopJob cancels one running job.
func (*SeaTunnelEngineClient) Submit ¶
func (c *SeaTunnelEngineClient) Submit(ctx context.Context, req *EngineSubmitRequest) (*EngineSubmitResponse, error)
Submit submits one SeaTunnel job.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service provides sync studio control-plane behavior.
func (*Service) BuildTaskDAG ¶
func (s *Service) BuildTaskDAG(ctx context.Context, id uint, draft *TaskDraftPayload) (*DAGResult, error)
BuildTaskDAG returns DAG projection for the task definition.
func (*Service) BuildTaskDAGForActor ¶ added in v1.0.0
func (s *Service) BuildTaskDAGForActor(ctx context.Context, actor executionapp.Actor, id uint, draft *TaskDraftPayload) (*DAGResult, error)
BuildTaskDAGForActor builds DAG after checking view permission.
func (*Service) CancelJob ¶
func (s *Service) CancelJob(ctx context.Context, id uint, stopWithSavepoint bool) (*JobInstance, error)
CancelJob 请求真实停止作业,并在确认停止前保留取消中间状态。 CancelJob requests a real stop and keeps intermediate cancellation states until the stop is confirmed.
func (*Service) CancelJobByRef ¶ added in v1.2.0
func (s *Service) CancelJobByRef(ctx context.Context, actor executionapp.Actor, ref string, generation int) (*JobInstance, error)
CancelJobByRef 按外部引用停止作业;generation 为 0 时使用当前代次。 CancelJobByRef stops the job for an external ref; generation 0 means "use the current generation".
func (*Service) CancelJobForActor ¶
func (s *Service) CancelJobForActor(ctx context.Context, actor executionapp.Actor, id uint, stopWithSavepoint bool) (*JobInstance, error)
CancelJobForActor 在权限检查后请求取消作业。仅管理员、发起人或任务所有者可取消。 CancelJobForActor requests cancellation after enforcing ownership. Only administrators, the job submitter, or task owner may cancel.
func (*Service) CollectPreview ¶
func (s *Service) CollectPreview(ctx context.Context, req *PreviewCollectRequest) error
func (*Service) CreateCuratedTemplate ¶ added in v1.0.0
func (s *Service) CreateCuratedTemplate(ctx context.Context, req *CreateCuratedTemplateRequest, userID uint) (*CuratedTemplateView, error)
CreateCuratedTemplate creates one user template (save-as / custom). CreateCuratedTemplate 创建用户精选(另存/自定义)。
func (*Service) CreateGlobalVariable ¶
func (s *Service) CreateGlobalVariable(ctx context.Context, req *CreateGlobalVariableRequest, createdBy uint) (*GlobalVariable, error)
CreateGlobalVariable creates one workspace-wide variable and returns a masked safe copy. CreateGlobalVariable 创建一个工作台全局变量并返回脱敏后的安全副本。
func (*Service) CreateSchedulerConnection ¶ added in v1.2.0
func (s *Service) CreateSchedulerConnection(ctx context.Context, req *SchedulerConnectionRequest, createdBy uint) (*SchedulerConnection, error)
CreateSchedulerConnection 保存一条新的调度器连接。 CreateSchedulerConnection stores a new scheduler connection.
func (*Service) CreateTask ¶
func (s *Service) CreateTask(ctx context.Context, req *CreateTaskRequest, createdBy uint) (*Task, error)
CreateTask creates one workspace node.
func (*Service) DeleteCuratedTemplate ¶ added in v1.0.0
DeleteCuratedTemplate deletes one owned curated template. DeleteCuratedTemplate 删除用户拥有的精选模板。
func (*Service) DeleteGlobalVariable ¶
DeleteGlobalVariable deletes one workspace-wide variable.
func (*Service) DeleteGlobalVariableForActor ¶ added in v1.0.0
func (s *Service) DeleteGlobalVariableForActor(ctx context.Context, actor executionapp.Actor, id uint) error
DeleteGlobalVariableForActor deletes one workspace-wide variable after enforcing actor permissions. Ordinary users can only delete variables they created; administrators can delete any variable.
func (*Service) DeleteTask ¶
DeleteTask removes one workspace node and all nested descendants.
func (*Service) DeleteTaskAlertForActor ¶ added in v1.3.0
func (s *Service) DeleteTaskAlertForActor(ctx context.Context, actor executionapp.Actor, taskID uint) error
DeleteTaskAlertForActor 删除任务告警配置并结束告警中的阶段;需要任务编辑权限。 DeleteTaskAlertForActor deletes the task alert config and ends firing episodes; it requires edit rights.
func (*Service) DeleteTaskForActor ¶ added in v1.0.0
DeleteTaskForActor removes one workspace node after verifying owner/admin rights.
func (*Service) DeleteTaskVersion ¶
DeleteTaskVersion removes one immutable snapshot.
func (*Service) DeleteTaskVersionForActor ¶ added in v1.0.0
func (s *Service) DeleteTaskVersionForActor(ctx context.Context, actor executionapp.Actor, id uint, versionID uint) error
DeleteTaskVersionForActor removes one immutable snapshot after checking edit permission.
func (*Service) ForkCuratedTemplate ¶ added in v1.0.0
func (s *Service) ForkCuratedTemplate(ctx context.Context, req *ForkCuratedTemplateRequest, userID uint) (*CuratedTemplateView, error)
ForkCuratedTemplate copies a built-in seed into the user's override row. ForkCuratedTemplate 将内置种子复制为用户的 override 行。
func (*Service) GetCuratedTemplateContentForInsert ¶ added in v1.0.0
func (s *Service) GetCuratedTemplateContentForInsert(ctx context.Context, builtinID string, userID uint, dbID uint, clusterID uint) (string, error)
GetCuratedTemplateContentForInsert returns content, rewriting plugin IO keys for legacy clusters. GetCuratedTemplateContentForInsert 返回待插入正文,并按低版本集群改写 plugin IO 键。
func (*Service) GetDolphinScript ¶ added in v1.2.0
func (s *Service) GetDolphinScript(ctx context.Context, actor executionapp.Actor, taskID uint, variables map[string]string, workerGroup, environment string) (*DolphinScriptResult, error)
GetDolphinScript 生成当前任务的 SHELL 节点脚本。 GetDolphinScript builds the SHELL node script for the current task.
func (*Service) GetDolphinTaskStatus ¶ added in v1.2.0
func (s *Service) GetDolphinTaskStatus(ctx context.Context, actor executionapp.Actor, taskID uint) (*DolphinTaskStatus, error)
GetDolphinTaskStatus 返回侧边栏需要的绑定、脚本和最近作业摘要。 GetDolphinTaskStatus returns the sidebar summary of binding, script, and recent jobs.
func (*Service) GetDolphinWorkflow ¶ added in v1.2.0
func (s *Service) GetDolphinWorkflow(ctx context.Context, connectionID uint, projectCode, workflowCode int64) (*DolphinWorkflowDetail, error)
GetDolphinWorkflow 读取工作流定义,供复用时勾选上下游。 GetDolphinWorkflow loads a workflow definition so callers can pick upstream/downstream nodes.
func (*Service) GetEventChannel ¶ added in v1.3.0
GetEventChannel 返回集群事件通道状态;没有记录时返回 disabled。 GetEventChannel returns a cluster event channel status; without a record it reports disabled.
func (*Service) GetJob ¶
GetJob returns one job instance from the database without hitting the engine. GetJob 只读数据库返回单个作业,不再同步刷新 SeaTunnel。
func (*Service) GetJobCheckpointSnapshot ¶
func (s *Service) GetJobCheckpointSnapshot( ctx context.Context, jobID uint, pipelineID *int, limit int, status string, ) (*CheckpointSnapshot, error)
GetJobCheckpointSnapshot returns checkpoint overview/history for one job. GetJobCheckpointSnapshot 返回单个作业的 checkpoint 概览与历史。
func (*Service) GetJobCheckpointSnapshotForActor ¶
func (s *Service) GetJobCheckpointSnapshotForActor(ctx context.Context, actor executionapp.Actor, id uint, pipelineID *int, limit int, status string) (*CheckpointSnapshot, error)
GetJobCheckpointSnapshotForActor 在权限检查后读取 Checkpoint 信息。 GetJobCheckpointSnapshotForActor reads checkpoint data after enforcing permission.
func (*Service) GetJobForActor ¶
func (s *Service) GetJobForActor(ctx context.Context, actor executionapp.Actor, id uint, fresh bool) (*JobInstance, error)
GetJobForActor 按当前用户归属或任务可见性读取一个作业。 GetJobForActor loads one job under the current user's ownership or task view scope.
func (*Service) GetJobLogs ¶
func (*Service) GetJobLogsForActor ¶
func (s *Service) GetJobLogsForActor(ctx context.Context, actor executionapp.Actor, id uint, offset string, limitBytes int, keyword, level string) (*JobLogsResult, error)
GetJobLogsForActor 在权限检查后读取作业日志。 GetJobLogsForActor reads job logs after enforcing permission.
func (*Service) GetJobPlanDAGForActor ¶ added in v1.3.0
func (s *Service) GetJobPlanDAGForActor(ctx context.Context, actor executionapp.Actor, id uint) (*JobPlanDAGResult, error)
GetJobPlanDAGForActor 校验作业可见权限后返回计划 DAG。 GetJobPlanDAGForActor returns the plan DAG after checking the job is visible to the actor.
func (*Service) GetJobRealtimeForActor ¶ added in v1.3.0
func (s *Service) GetJobRealtimeForActor(ctx context.Context, actor executionapp.Actor, id uint, windowMs int64) (*JobRealtimeResult, error)
GetJobRealtimeForActor 在权限检查后返回作业的实时指标与瓶颈提示。 GetJobRealtimeForActor returns realtime metrics and bottleneck hints for a job after enforcing permission.
func (*Service) GetJobTimeseriesForActor ¶ added in v1.3.0
func (s *Service) GetJobTimeseriesForActor(ctx context.Context, actor executionapp.Actor, id uint, rangeKey, metricsCSV string, step int) (*JobTimeseriesResult, error)
GetJobTimeseriesForActor 在权限检查后返回作业时序(仅 Prometheus)。 GetJobTimeseriesForActor returns job timeseries after enforcing permission (Prometheus only).
func (*Service) GetPluginOptions ¶
func (s *Service) GetPluginOptions( ctx context.Context, req *GetSyncPluginOptionsRequest, ) (*SyncPluginOptionSchemaResult, error)
func (*Service) GetPreviewSnapshot ¶
func (s *Service) GetPreviewSnapshot(ctx context.Context, jobID uint, tablePath string) (*PreviewSnapshot, error)
GetPreviewSnapshot returns one incremental preview snapshot for a job instance. GetPreviewSnapshot 返回一个作业实例的增量预览快照。
func (*Service) GetPreviewSnapshotForActor ¶
func (s *Service) GetPreviewSnapshotForActor(ctx context.Context, actor executionapp.Actor, id uint, tablePath string) (*PreviewSnapshot, error)
GetPreviewSnapshotForActor 在权限检查后读取预览结果。 GetPreviewSnapshotForActor reads a preview snapshot after enforcing permission.
func (*Service) GetTaskAlertForActor ¶ added in v1.3.0
func (s *Service) GetTaskAlertForActor(ctx context.Context, actor executionapp.Actor, taskID uint) (*syncalert.TaskConfig, error)
GetTaskAlertForActor 返回任务告警配置;没有配置时 configured=false。能看到任务的人都能查看。 GetTaskAlertForActor returns the task alert config (configured=false when none); anyone who can view the task may read it.
func (*Service) GetTaskForActor ¶ added in v1.0.0
func (s *Service) GetTaskForActor(ctx context.Context, actor executionapp.Actor, id uint) (*Task, error)
GetTaskForActor returns one workspace node decorated with actor permissions.
func (*Service) GetTaskPermissionsForActor ¶ added in v1.0.0
func (s *Service) GetTaskPermissionsForActor(ctx context.Context, actor executionapp.Actor, id uint) (*TaskPermissions, error)
GetTaskPermissionsForActor 只返回共享权限,不返回任务正文。 GetTaskPermissionsForActor returns sharing permissions without exposing task content.
func (*Service) GetTaskTree ¶
func (s *Service) GetTaskTree(ctx context.Context) ([]*TaskTreeNode, error)
GetTaskTree returns nested workspace nodes for the left tree.
func (*Service) GetTaskTreeForActor ¶ added in v1.0.0
func (s *Service) GetTaskTreeForActor(ctx context.Context, actor executionapp.Actor) ([]*TaskTreeNode, error)
GetTaskTreeForActor returns nested workspace nodes filtered and decorated with actor permissions.
func (*Service) IngestEngineEvents ¶ added in v1.3.0
func (s *Service) IngestEngineEvents(ctx context.Context, clusterID uint, authorization string, body []byte) (*EngineEventIngestResult, error)
IngestEngineEvents 接收 event-report-http 的一批事件。token 错误返回 ErrEventChannelUnauthorized; 其他任何问题(通道未开启、内容非法、未知作业)都返回成功,避免引擎重试同一批而堵塞后续事件。 IngestEngineEvents receives one event-report-http batch. A bad token returns ErrEventChannelUnauthorized; every other problem (channel disabled, invalid content, unknown job) succeeds so the engine never retries the same batch and blocks later events.
func (*Service) ListClusterRunningJobs ¶ added in v1.2.0
func (s *Service) ListClusterRunningJobs(ctx context.Context, clusterID uint) ([]*EngineJobListItem, error)
ListClusterRunningJobs 按集群维度读取 SeaTunnel 引擎当前运行中的作业(/running-jobs),供集群扩缩容护栏使用。 结果按作业编号排序且永不为 nil;引擎不可达时返回错误,调用方据此把运行中作业视为未知。 ListClusterRunningJobs reads the jobs currently running on a cluster's SeaTunnel engine (/running-jobs) for cluster scaling guardrails. The result is sorted by job ID and never nil; an unreachable engine returns an error so callers can treat running jobs as unknown.
func (*Service) ListCuratedTemplates ¶ added in v1.0.0
func (s *Service) ListCuratedTemplates(ctx context.Context, req *ListCuratedTemplatesRequest, userID uint) (*CuratedTemplateListData, error)
ListCuratedTemplates merges built-in seeds with the current user's DB rows. ListCuratedTemplates 合并内置种子与当前用户的数据库行。
func (*Service) ListDolphinProjects ¶ added in v1.2.0
func (s *Service) ListDolphinProjects(ctx context.Context, connectionID uint) ([]DolphinProject, error)
ListDolphinProjects 列出连接上的 Dolphin 项目。 ListDolphinProjects lists Dolphin projects available on a connection.
func (*Service) ListDolphinWorkflows ¶ added in v1.2.0
func (s *Service) ListDolphinWorkflows(ctx context.Context, connectionID uint, projectCode int64) ([]DolphinWorkflowSummary, error)
ListDolphinWorkflows 列出项目下的工作流定义。 ListDolphinWorkflows lists workflow definitions in a project.
func (*Service) ListGlobalVariables ¶
func (s *Service) ListGlobalVariables(ctx context.Context) ([]*GlobalVariable, error)
ListGlobalVariables returns all workspace-wide variables.
func (*Service) ListGlobalVariablesPaginated ¶
func (s *Service) ListGlobalVariablesPaginated(ctx context.Context, page, size int) ([]*GlobalVariable, int64, error)
ListGlobalVariablesPaginated returns paginated workspace-wide variables with sensitive values masked. ListGlobalVariablesPaginated 返回分页全局变量,敏感凭据值将被脱敏为 ******。
func (*Service) ListJobEventsForActor ¶ added in v1.3.0
func (s *Service) ListJobEventsForActor(ctx context.Context, actor executionapp.Actor, jobID uint, eventTypes []string, page, size int) (*JobEventListResult, error)
ListJobEventsForActor 在权限检查后返回作业事件时间线。 ListJobEventsForActor returns a job's event timeline after enforcing permission.
func (*Service) ListJobs ¶
ListJobs returns paginated job instances from the database without hitting the engine. ListJobs 只读数据库返回分页作业,不再同步刷新 SeaTunnel。
func (*Service) ListJobsForActor ¶
func (s *Service) ListJobsForActor(ctx context.Context, actor executionapp.Actor, filter *JobFilter) ([]*JobInstance, int64, error)
ListJobsForActor 按当前用户归属列出作业,管理员或具备任务查看权限的用户可查看任务历史。 ListJobsForActor lists jobs owned by the current user, while administrators or users with task view access may view task job history.
func (*Service) ListPluginEnumCatalog ¶
func (s *Service) ListPluginEnumCatalog( ctx context.Context, req *ListSyncPluginEnumCatalogRequest, ) (*SyncPluginEnumCatalogResult, error)
func (*Service) ListPluginEnumValues ¶
func (s *Service) ListPluginEnumValues( ctx context.Context, req *ListSyncPluginEnumValuesRequest, ) (*SyncPluginEnumValuesResult, error)
func (*Service) ListPluginFactories ¶
func (s *Service) ListPluginFactories( ctx context.Context, req *ListSyncPluginFactoriesRequest, ) (*SyncPluginFactoryListResult, error)
func (*Service) ListSchedulerConnections ¶ added in v1.2.0
func (s *Service) ListSchedulerConnections(ctx context.Context) ([]*SchedulerConnection, error)
ListSchedulerConnections 返回脱敏后的调度器连接列表。 ListSchedulerConnections returns scheduler connections with tokens masked.
func (*Service) ListTaskVersions ¶
ListTaskVersions returns all immutable snapshots for one file task.
func (*Service) ListTaskVersionsPaginated ¶
func (s *Service) ListTaskVersionsPaginated(ctx context.Context, id uint, page, size int) ([]*TaskVersion, int64, error)
ListTaskVersionsPaginated returns paginated immutable snapshots for one file task.
func (*Service) ListTaskVersionsPaginatedForActor ¶ added in v1.0.0
func (s *Service) ListTaskVersionsPaginatedForActor(ctx context.Context, actor executionapp.Actor, id uint, page, size int) ([]*TaskVersion, int64, error)
ListTaskVersionsPaginatedForActor returns paginated snapshots after verifying view permission.
func (*Service) ParseCuratedCombo ¶ added in v1.0.0
func (s *Service) ParseCuratedCombo(_ context.Context, req *ParseCuratedComboRequest) (*CuratedComboParseData, error)
ParseCuratedCombo extracts env/source/transform/sink from full job content. ParseCuratedCombo 从完整作业正文提取 env/source/transform/sink 四节。
func (*Service) PreviewSinkSaveMode ¶
func (s *Service) PreviewSinkSaveMode( ctx context.Context, taskID uint, req *PreviewSyncSinkSaveModeRequest, ) (*SyncSinkSaveModePreviewResult, error)
func (*Service) PreviewTask ¶
func (s *Service) PreviewTask(ctx context.Context, id uint, createdBy uint, opts *PreviewTaskRequest) (*JobInstance, error)
PreviewTask derives preview config then submits a debug run if possible.
func (*Service) PreviewTaskForActor ¶ added in v1.0.0
func (s *Service) PreviewTaskForActor(ctx context.Context, actor executionapp.Actor, id uint, opts *PreviewTaskRequest, request ExecutionRequest) (*JobInstance, error)
PreviewTaskForActor 检查运行权限后启动预览任务。
func (*Service) PreviewTaskWithExecution ¶
func (s *Service) PreviewTaskWithExecution(ctx context.Context, id, createdBy uint, opts *PreviewTaskRequest, request ExecutionRequest) (*JobInstance, error)
PreviewTaskWithExecution 创建公共执行记录后启动预览任务。 PreviewTaskWithExecution starts a preview task after creating its shared execution record.
func (*Service) PublishTask ¶
func (s *Service) PublishTask(ctx context.Context, id uint, comment string, createdBy uint) (*Task, *TaskVersion, error)
PublishTask snapshots current file definition and marks task as published.
func (*Service) PublishTaskForActor ¶ added in v1.0.0
func (s *Service) PublishTaskForActor(ctx context.Context, actor executionapp.Actor, id uint, comment string, createdBy uint) (*Task, *TaskVersion, error)
PublishTaskForActor snapshots current file definition after checking edit permission.
func (*Service) PushDolphin ¶ added in v1.2.0
func (s *Service) PushDolphin(ctx context.Context, actor executionapp.Actor, taskID uint, req *DolphinPushRequest) (*DolphinPushResult, error)
PushDolphin 把任务推送到 Dolphin:新建工作流、复用已有工作流,或只更新已绑定节点。 PushDolphin pushes a task into Dolphin as a new workflow, a reused workflow, or a node-only update.
func (*Service) RecoverJob ¶
func (s *Service) RecoverJob(ctx context.Context, sourceJobID uint, createdBy uint, draft *TaskDraftPayload) (*JobInstance, error)
RecoverJob recreates a run using the original platform job id as savepoint recovery source.
func (*Service) RecoverJobWithExecution ¶
func (s *Service) RecoverJobWithExecution(ctx context.Context, sourceJobID, createdBy uint, draft *TaskDraftPayload, request ExecutionRequest) (*JobInstance, error)
RecoverJobWithExecution 创建公共执行记录后恢复作业。 RecoverJobWithExecution recovers a job after creating its shared execution record.
func (*Service) RefreshJobByID ¶ added in v1.2.0
RefreshJobByID 主动从引擎刷新一条作业(?fresh=1 或对账器补详情时使用)。 RefreshJobByID actively refreshes one job from the engine (?fresh=1 or reconciler detail fetch).
func (*Service) RenderPluginTemplate ¶
func (s *Service) RenderPluginTemplate( ctx context.Context, req *RenderSyncPluginTemplateRequest, ) (*SyncPluginTemplateResult, error)
func (*Service) RequestCancel ¶
func (s *Service) RequestCancel(ctx context.Context, item *executionapp.Execution, _ executionapp.Actor) (executionapp.CancelResult, error)
RequestCancel 实现公共执行协议的同步任务真实取消入口。 RequestCancel implements the real cancellation entry for sync jobs under the shared execution contract.
func (*Service) ResolveTaskNames ¶ added in v1.3.0
ResolveTaskNames 按 ID 批量查询任务名,供告警策略列表显示;实现 monitoring.SyncTaskNameResolver。 ResolveTaskNames looks up task names by ID for the alert policy list; it implements monitoring.SyncTaskNameResolver.
func (*Service) RollbackTaskVersion ¶
RollbackTaskVersion restores one immutable snapshot back to the editable task.
func (*Service) RollbackTaskVersionForActor ¶ added in v1.0.0
func (s *Service) RollbackTaskVersionForActor(ctx context.Context, actor executionapp.Actor, id uint, versionID uint) (*Task, error)
RollbackTaskVersionForActor restores snapshot after checking edit permission.
func (*Service) SetAgentCommandSender ¶
func (s *Service) SetAgentCommandSender(sender AgentCommandSender)
func (*Service) SetAlertReporter ¶ added in v1.3.0
SetAlertReporter 注入作业告警信号的接收方;未注入时 sync 不产生任何告警信号。 SetAlertReporter injects the receiver of job alert signals; without it sync emits no alert signals.
func (*Service) SetClusterLogProvider ¶
func (s *Service) SetClusterLogProvider(provider ClusterLogProvider)
func (*Service) SetClusterVersionProvider ¶
func (s *Service) SetClusterVersionProvider(provider ClusterVersionProvider)
func (*Service) SetConfigToolClient ¶
func (s *Service) SetConfigToolClient(client ConfigToolClient)
SetConfigToolClient sets the java-proxy config tool client.
func (*Service) SetConfigToolResolver ¶
func (s *Service) SetConfigToolResolver(resolver ConfigToolResolver)
SetConfigToolResolver sets the java-proxy endpoint resolver.
func (*Service) SetDolphinHTTPClient ¶ added in v1.2.0
SetDolphinHTTPClient 覆盖访问 Dolphin API 的 HTTP 客户端,测试可注入 httptest。 SetDolphinHTTPClient overrides the HTTP client used for Dolphin API calls so tests can inject httptest.
func (*Service) SetEngineClient ¶
func (s *Service) SetEngineClient(client EngineClient)
SetEngineClient sets the SeaTunnel engine client used by submit/get/cancel flows.
func (*Service) SetEventReportConfigApplier ¶ added in v1.3.0
func (s *Service) SetEventReportConfigApplier(applier EventReportConfigApplier)
SetEventReportConfigApplier 注入 seatunnel.yaml 写入器。 SetEventReportConfigApplier injects the seatunnel.yaml writer.
func (*Service) SetExecutionService ¶
func (s *Service) SetExecutionService(service *executionapp.Service)
SetExecutionService 设置公共执行协议服务。 SetExecutionService configures the shared execution-contract service.
func (*Service) SetExecutionTargetResolver ¶
func (s *Service) SetExecutionTargetResolver(resolver ExecutionTargetResolver)
func (*Service) SetJobIDGenerator ¶
func (s *Service) SetJobIDGenerator(generator *JobIDGenerator)
SetJobIDGenerator sets the platform job id generator.
func (*Service) SetRuntimeResolver ¶
func (s *Service) SetRuntimeResolver(resolver ClusterRuntimeResolver)
SetRuntimeResolver sets the runtime endpoint resolver for cluster-backed submissions.
func (*Service) SetTaskAlertPolicyStore ¶ added in v1.3.0
func (s *Service) SetTaskAlertPolicyStore(store syncalert.TaskPolicyStore)
SetTaskAlertPolicyStore 注入任务告警配置的存取实现;未注入时任务告警接口返回 503。 SetTaskAlertPolicyStore injects the task alert config store; without it the task alert API returns 503.
func (*Service) StartEngineEventRuntime ¶ added in v1.3.0
StartEngineEventRuntime 启动事件运行时:防抖刷新、预期检查、B4 延迟告警判定、过期清理。 StartEngineEventRuntime starts the event runtime: debounced refreshes, expectation checks, B4 delay alert rounds and retention purge.
func (*Service) StartJobObservabilityCollector ¶ added in v1.3.0
StartJobObservabilityCollector 在 STX observability 开启时,后台采集运行中作业的 Checkpoint; busy/backpressure(realtime)仅在作业开启引擎可观测性时采集。 StartJobObservabilityCollector starts background Checkpoint collection for running jobs when STX observability is enabled; busy/backpressure (realtime) still requires the job's engine observability.
func (*Service) StartJobReconciler ¶ added in v1.2.0
StartJobReconciler 启动按集群对账 SeaTunnel 作业状态的后台任务。 StartJobReconciler starts the per-cluster SeaTunnel job status reconciler.
func (*Service) StartPreviewRuntime ¶
StartPreviewRuntime starts background maintenance for preview sessions. StartPreviewRuntime 启动预览会话后台维护任务。
func (*Service) StartTaskScheduleRuntime ¶
func (*Service) SubmitTask ¶
func (s *Service) SubmitTask(ctx context.Context, id uint, createdBy uint, draft *TaskDraftPayload) (*JobInstance, error)
SubmitTask creates one formal run instance with platform-managed job id.
func (*Service) SubmitTaskForActor ¶ added in v1.0.0
func (s *Service) SubmitTaskForActor(ctx context.Context, actor executionapp.Actor, id uint, draft *TaskDraftPayload, request ExecutionRequest) (*JobInstance, error)
SubmitTaskForActor 检查运行权限后提交运行任务。
func (*Service) SubmitTaskForActorWithOptions ¶ added in v1.2.0
func (s *Service) SubmitTaskForActorWithOptions(ctx context.Context, actor executionapp.Actor, id uint, opts *SubmitOptions, request ExecutionRequest) (*JobInstance, error)
SubmitTaskForActorWithOptions 在权限和调度令牌校验后提交或接管作业。 SubmitTaskForActorWithOptions submits or attaches after permission and scheduler-token checks.
func (*Service) SubmitTaskWithExecution ¶
func (s *Service) SubmitTaskWithExecution(ctx context.Context, id, createdBy uint, draft *TaskDraftPayload, request ExecutionRequest) (*JobInstance, error)
SubmitTaskWithExecution 创建公共执行记录后提交运行任务。 SubmitTaskWithExecution submits a run task after creating its shared execution record.
func (*Service) SubmitTaskWithExecutionOptions ¶ added in v1.2.0
func (s *Service) SubmitTaskWithExecutionOptions(ctx context.Context, id, createdBy uint, opts *SubmitOptions, request ExecutionRequest) (*JobInstance, error)
SubmitTaskWithExecutionOptions 先尝试按 external_ref 接管,未命中再创建公共执行记录并提交。 SubmitTaskWithExecutionOptions attaches by external_ref when possible, otherwise creates a shared execution and submits.
func (*Service) SubmitTaskWithOptions ¶ added in v1.2.0
func (s *Service) SubmitTaskWithOptions(ctx context.Context, id uint, createdBy uint, opts *SubmitOptions) (*JobInstance, error)
SubmitTaskWithOptions 按本次覆盖项提交作业;同一 external_ref 运行中则接管。 SubmitTaskWithOptions submits a job with per-run overrides and attaches when the same external_ref is still running.
func (*Service) TestTaskConnections ¶
func (s *Service) TestTaskConnections(ctx context.Context, id uint, draft *TaskDraftPayload) (*ValidateResult, error)
TestTaskConnections validates connector connectivity for the task definition.
func (*Service) TestTaskConnectionsForActor ¶ added in v1.0.0
func (s *Service) TestTaskConnectionsForActor(ctx context.Context, actor executionapp.Actor, id uint, draft *TaskDraftPayload) (*ValidateResult, error)
TestTaskConnectionsForActor tests connections after checking run permission.
func (*Service) UnbindDolphin ¶ added in v1.2.0
UnbindDolphin 只删除 STX 侧绑定,不改 Dolphin 节点,也不吊销管理员签发的登录令牌。 UnbindDolphin removes the STX binding without changing Dolphin nodes or revoking admin-issued login tokens.
func (*Service) UpdateCuratedTemplate ¶ added in v1.0.0
func (s *Service) UpdateCuratedTemplate(ctx context.Context, id uint, req *UpdateCuratedTemplateRequest, userID uint) (*CuratedTemplateView, error)
UpdateCuratedTemplate updates one owned curated template. UpdateCuratedTemplate 更新用户拥有的精选模板。
func (*Service) UpdateEventChannelForActor ¶ added in v1.3.0
func (s *Service) UpdateEventChannelForActor(ctx context.Context, actor executionapp.Actor, clusterID uint, req *UpdateEventChannelRequest) (*EventChannelStatus, error)
UpdateEventChannelForActor 开启、关闭或轮换事件通道,并把 event-report-http 写入 seatunnel.yaml;仅管理员可操作。 UpdateEventChannelForActor enables, disables or rotates the event channel and writes event-report-http into seatunnel.yaml; admins only.
func (*Service) UpdateGlobalVariable ¶
func (s *Service) UpdateGlobalVariable(ctx context.Context, id uint, req *UpdateGlobalVariableRequest) (*GlobalVariable, error)
UpdateGlobalVariable updates one workspace-wide variable and returns a masked safe copy. UpdateGlobalVariable 更新工作台全局变量并返回脱敏后的安全副本。
func (*Service) UpdateGlobalVariableForActor ¶ added in v1.0.0
func (s *Service) UpdateGlobalVariableForActor(ctx context.Context, actor executionapp.Actor, id uint, req *UpdateGlobalVariableRequest) (*GlobalVariable, error)
UpdateGlobalVariableForActor updates one workspace-wide variable after enforcing actor permissions. Ordinary users can only edit variables they created; administrators can edit any variable.
func (*Service) UpdateSchedulerConnection ¶ added in v1.2.0
func (s *Service) UpdateSchedulerConnection(ctx context.Context, id uint, req *SchedulerConnectionRequest) (*SchedulerConnection, error)
UpdateSchedulerConnection 更新调度器连接;空 token 表示保留原值。 UpdateSchedulerConnection updates a scheduler connection and keeps the previous token when the new one is empty.
func (*Service) UpdateTask ¶
UpdateTask updates one workspace node.
func (*Service) UpdateTaskAlertForActor ¶ added in v1.3.0
func (s *Service) UpdateTaskAlertForActor(ctx context.Context, actor executionapp.Actor, taskID uint, req *TaskAlertRequest) (*syncalert.TaskConfig, error)
UpdateTaskAlertForActor 新建或修改任务告警配置,立即生效,不跟随任务版本;需要任务编辑权限。 UpdateTaskAlertForActor creates or updates the task alert config; it takes effect immediately, is not versioned with the task and requires edit rights.
func (*Service) UpdateTaskForActor ¶ added in v1.0.0
func (s *Service) UpdateTaskForActor(ctx context.Context, actor executionapp.Actor, id uint, req *UpdateTaskRequest) (*Task, error)
UpdateTaskForActor updates one workspace node after enforcing actor permissions.
func (*Service) UpdateTaskPermissionsForActor ¶ added in v1.0.0
func (s *Service) UpdateTaskPermissionsForActor(ctx context.Context, actor executionapp.Actor, id uint, req *UpdateTaskPermissionsRequest) (*TaskPermissions, *TaskPermissions, error)
UpdateTaskPermissionsForActor 只修改共享字段,并返回修改前后的值供审计记录使用。 UpdateTaskPermissionsForActor changes only sharing fields and returns before/after values for audit.
func (*Service) ValidateTask ¶
func (s *Service) ValidateTask(ctx context.Context, id uint, draft *TaskDraftPayload) (*ValidateResult, error)
ValidateTask validates current file content.
func (*Service) ValidateTaskForActor ¶ added in v1.0.0
func (s *Service) ValidateTaskForActor(ctx context.Context, actor executionapp.Actor, id uint, draft *TaskDraftPayload) (*ValidateResult, error)
ValidateTaskForActor validates task after checking view permission.
type SinkSaveModePreviewResponse ¶
type SinkSaveModePreviewResponse struct {
ErrorMsg string `json:"error_msg"`
Data *SyncSinkSaveModePreviewResult `json:"data"`
}
type SubmitOptions ¶ added in v1.2.0
type SubmitOptions struct {
Draft *TaskDraftPayload
Variables map[string]string
ExternalRef string
ScheduleTime time.Time
CloseJob *bool
}
SubmitOptions 描述一次正式提交的可选覆盖项,空值保持原有提交行为。 SubmitOptions holds optional per-submit overrides; empty values keep legacy submit behavior.
type SyncPluginEnumCatalogPlugin ¶
type SyncPluginEnumCatalogPlugin struct {
PluginType string `json:"plugin_type"`
FactoryIdentifier string `json:"factory_identifier"`
Options []SyncPluginOptionDescriptor `json:"options"`
}
type SyncPluginEnumCatalogResult ¶
type SyncPluginEnumCatalogResult struct {
EnvOptions []SyncPluginOptionDescriptor `json:"env_options"`
Plugins []SyncPluginEnumCatalogPlugin `json:"plugins"`
Warnings []string `json:"warnings,omitempty"`
}
type SyncPluginFactoryInfo ¶
type SyncPluginFactoryListResult ¶
type SyncPluginFactoryListResult struct {
PluginType string `json:"plugin_type"`
Plugins []SyncPluginFactoryInfo `json:"plugins"`
Warnings []string `json:"warnings,omitempty"`
}
type SyncPluginOptionDescriptor ¶
type SyncPluginOptionDescriptor struct {
Key string `json:"key"`
Type string `json:"type,omitempty"`
ElementType string `json:"element_type,omitempty"`
DefaultValue interface{} `json:"default_value,omitempty"`
Description string `json:"description,omitempty"`
FallbackKeys []string `json:"fallback_keys,omitempty"`
EnumValues []string `json:"enum_values,omitempty"`
EnumDisplayValues []string `json:"enum_display_values,omitempty"`
RequiredMode string `json:"required_mode,omitempty"`
ConditionExpression string `json:"condition_expression,omitempty"`
ConstraintGroup string `json:"constraint_group,omitempty"`
Origins []string `json:"origins,omitempty"`
DeclaredClasses []string `json:"declared_classes,omitempty"`
Advanced bool `json:"advanced"`
}
type SyncPluginOptionSchemaResult ¶
type SyncPluginOptionSchemaResult struct {
PluginType string `json:"plugin_type"`
FactoryIdentifier string `json:"factory_identifier"`
Options []SyncPluginOptionDescriptor `json:"options"`
ValueConstraints []map[string]interface{} `json:"value_constraints,omitempty"`
ConditionRules []map[string]interface{} `json:"condition_rules,omitempty"`
Warnings []string `json:"warnings,omitempty"`
}
type SyncPluginType ¶
type SyncPluginType string
const ( SyncPluginTypeSource SyncPluginType = "source" SyncPluginTypeTransform SyncPluginType = "transform" SyncPluginTypeSink SyncPluginType = "sink" SyncPluginTypeCatalog SyncPluginType = "catalog" )
type SyncSinkSaveModePreviewResult ¶
type SyncSinkSaveModePreviewResult struct {
Connector string `json:"connector,omitempty"`
SinkIndex int `json:"sink_index,omitempty"`
Supported bool `json:"supported"`
Completeness string `json:"completeness,omitempty"`
SchemaSaveMode string `json:"schema_save_mode,omitempty"`
DataSaveMode string `json:"data_save_mode,omitempty"`
TablePath string `json:"table_path,omitempty"`
Actions []SyncSinkSaveModePreviewAction `json:"actions,omitempty"`
Tables []SyncSinkSaveModePreviewTable `json:"tables,omitempty"`
Warnings []string `json:"warnings,omitempty"`
}
type SyncSinkSaveModePreviewTable ¶
type SyncSinkSaveModePreviewTable struct {
TablePath string `json:"table_path,omitempty"`
Supported bool `json:"supported"`
Completeness string `json:"completeness,omitempty"`
SchemaSaveMode string `json:"schema_save_mode,omitempty"`
DataSaveMode string `json:"data_save_mode,omitempty"`
Actions []SyncSinkSaveModePreviewAction `json:"actions,omitempty"`
Warnings []string `json:"warnings,omitempty"`
}
type Task ¶
type Task struct {
ID uint `json:"id" gorm:"primaryKey;autoIncrement"`
ParentID *uint `json:"parent_id,omitempty" gorm:"index"`
NodeType TaskNodeType `json:"node_type" gorm:"size:20;not null;default:file;index"`
Name string `json:"name" gorm:"size:120;not null;index"`
Description string `json:"description" gorm:"type:text"`
ClusterID uint `json:"cluster_id" gorm:"index"`
EngineVersion string `json:"engine_version" gorm:"size:50"`
Mode TaskMode `json:"mode" gorm:"size:20;default:streaming"`
Status TaskStatus `json:"status" gorm:"size:20;default:draft;index"`
ContentFormat ContentFormat `json:"content_format" gorm:"size:20;not null;default:hocon"`
// Content 存储任务定义内容(HOCON 或 JSON);MySQL 用 MEDIUMTEXT,PG/SQLite 用 TEXT。
// Content stores task definition (HOCON/JSON); MySQL uses MEDIUMTEXT, PG/SQLite use TEXT.
Content db.ScriptText `json:"content"`
JobName string `json:"job_name" gorm:"size:255"`
Definition JSONMap `json:"definition" gorm:"type:json"`
SortOrder int `json:"sort_order" gorm:"default:0;index"`
CurrentVersion int `json:"current_version" gorm:"default:0"`
ScheduleEnabled bool `json:"schedule_enabled" gorm:"-"`
ScheduleCronExpr string `json:"schedule_cron_expr,omitempty" gorm:"-"`
ScheduleTimezone string `json:"schedule_timezone,omitempty" gorm:"-"`
ScheduleLastTriggeredAt *time.Time `json:"schedule_last_triggered_at,omitempty" gorm:"-"`
ScheduleNextTriggeredAt *time.Time `json:"schedule_next_triggered_at,omitempty" gorm:"-"`
CanEdit bool `json:"can_edit" gorm:"-"`
CanRun bool `json:"can_run" gorm:"-"`
IsOwner bool `json:"is_owner" gorm:"-"`
IsCollaborator bool `json:"is_collaborator" gorm:"-"`
IsPublicTask bool `json:"is_public" gorm:"-"`
CreatedBy uint `json:"created_by"`
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"`
// TimeoutDefaults 只在任务详情里返回全局超时默认值,供任务设置的占位提示使用。
// TimeoutDefaults is returned on task detail only, carrying global timeout defaults for the settings placeholders.
TimeoutDefaults *TaskTimeoutDefaults `json:"timeout_defaults,omitempty" gorm:"-"`
}
Task represents one sync studio workspace node. Task 表示一个数据同步工作台节点。
func (*Task) CanUserEdit ¶ added in v1.0.0
CanUserEdit reports whether the given user can edit, save, or delete this task.
func (*Task) CanUserRun ¶ added in v1.0.0
CanUserRun reports whether the given user can run/submit/preview this task.
func (*Task) CanUserView ¶ added in v1.0.0
CanUserView reports whether the given user can view this task.
func (*Task) CollaboratorIDs ¶ added in v1.0.0
CollaboratorIDs returns the list of user IDs specified as co-developers.
func (*Task) DecoratePermissions ¶ added in v1.0.0
DecoratePermissions populates permission flags based on the caller's identity.
func (*Task) HasCollaborator ¶ added in v1.0.0
HasCollaborator checks if the given user ID is in collaborators list.
type TaskActionRequest ¶
type TaskActionRequest struct {
Draft *TaskDraftPayload `json:"draft,omitempty"`
Variables map[string]string `json:"variables,omitempty"`
ExternalRef string `json:"external_ref,omitempty"`
ScheduleTime string `json:"schedule_time,omitempty"`
CloseJob *bool `json:"close_job,omitempty"`
}
TaskActionRequest represents an action request with an optional unsaved draft.
type TaskAlertRequest ¶ added in v1.3.0
type TaskAlertRequest struct {
Enabled *bool `json:"enabled"`
Rules []string `json:"rules"`
ChannelIDs []uint `json:"channel_ids"`
ReceiverUserIDs []uint `json:"receiver_user_ids"`
NotifyTaskOwner bool `json:"notify_task_owner"`
CooldownMinutes *int `json:"cooldown_minutes"`
SendRecovery *bool `json:"send_recovery"`
// CDCDelayThresholdSeconds 是 B4 阈值(秒),范围 10~86400,超出返回 400。不填时保留已保存的值(新建时为默认 60);
// 明确填 0 表示恢复默认 60。
// CDCDelayThresholdSeconds is the B4 threshold in seconds, range 10..86400, else 400. Omitted keeps the stored
// value (the default 60 on create); an explicit 0 resets to the default 60.
CDCDelayThresholdSeconds *int `json:"cdc_delay_threshold_seconds"`
// CDCDelayDurationMinutes 是 B4 持续时间(分钟),范围 1~60,超出返回 400。不填时保留已保存的值(新建时为默认 5);
// 明确填 0 表示恢复默认 5。
// CDCDelayDurationMinutes is the B4 duration in minutes, range 1..60, else 400. Omitted keeps the stored value
// (the default 5 on create); an explicit 0 resets to the default 5.
CDCDelayDurationMinutes *int `json:"cdc_delay_duration_minutes"`
}
TaskAlertRequest 是 PUT /api/v1/sync/tasks/:id/alert 的请求体;enabled、send_recovery 默认 true,cooldown_minutes 默认 60。 TaskAlertRequest is the body of PUT /api/v1/sync/tasks/:id/alert; enabled and send_recovery default to true and cooldown_minutes to 60.
type TaskAlertResponse ¶ added in v1.3.0
type TaskAlertResponse struct {
ErrorMsg string `json:"error_msg"`
Data *syncalert.TaskConfig `json:"data"`
}
TaskAlertResponse 是任务告警接口的响应。 TaskAlertResponse is the response of the task alert API.
type TaskDraftPayload ¶
type TaskDraftPayload struct {
Name string `json:"name"`
Description string `json:"description"`
ClusterID uint `json:"cluster_id"`
EngineVersion string `json:"engine_version"`
Mode string `json:"mode"`
ContentFormat string `json:"content_format"`
Content string `json:"content"`
JobName string `json:"job_name"`
Definition JSONMap `json:"definition"`
}
TaskDraftPayload represents one unsaved in-memory task draft used by actions.
type TaskFilter ¶
type TaskFilter struct {
Name string
Status TaskStatus
Page int
Size int
}
TaskFilter represents task list query filters.
type TaskListData ¶
TaskListData represents task list response data.
type TaskListResponse ¶
type TaskListResponse struct {
ErrorMsg string `json:"error_msg"`
Data *TaskListData `json:"data"`
}
type TaskMode ¶
type TaskMode string
TaskMode represents sync task runtime mode. TaskMode 表示同步任务运行模式。
type TaskNodeType ¶
type TaskNodeType string
TaskNodeType represents sync workspace node type. TaskNodeType 表示同步工作台节点类型。
const ( TaskNodeTypeFolder TaskNodeType = "folder" TaskNodeTypeFile TaskNodeType = "file" )
type TaskPermissions ¶ added in v1.0.0
type TaskPermissions struct {
TaskID uint `json:"task_id"`
IsPublic bool `json:"is_public"`
CollaboratorIDs []uint `json:"collaborator_ids"`
CanEdit bool `json:"can_edit"`
CanManage bool `json:"can_manage"`
IsOwner bool `json:"is_owner"`
IsCollaborator bool `json:"is_collaborator"`
}
TaskPermissions 只包含独立权限接口对外提供的共享字段。 TaskPermissions contains only the sharing fields exposed by the dedicated permissions API.
type TaskPermissionsResponse ¶ added in v1.0.0
type TaskPermissionsResponse struct {
ErrorMsg string `json:"error_msg"`
Data *TaskPermissions `json:"data"`
}
type TaskResponse ¶
type TaskSchedulerBinding ¶ added in v1.2.0
type TaskSchedulerBinding struct {
ID uint `json:"id" gorm:"primaryKey;autoIncrement"`
TaskID uint `json:"task_id" gorm:"uniqueIndex;not null"`
Kind string `json:"kind" gorm:"size:32;not null;index;default:dolphin"`
ConnectionID uint `json:"connection_id" gorm:"index;not null"`
ProjectCode int64 `json:"project_code" gorm:"not null"`
WorkflowCode int64 `json:"workflow_code" gorm:"not null"`
TaskCode int64 `json:"task_code" gorm:"not null"`
WorkflowName string `json:"workflow_name" gorm:"size:255"`
ConsoleURL string `json:"console_url" gorm:"size:1024"`
PushedAt *time.Time `json:"pushed_at"`
PushedBy uint `json:"pushed_by"`
// TaskVersion 记录这次推送对应的 STX 已发布版本;同一版本不能再更新推送。
// TaskVersion is the STX published version this push deployed; the same version cannot be pushed again.
TaskVersion int `json:"task_version"`
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
UpdatedAt time.Time `json:"updated_at" gorm:"autoUpdateTime"`
}
TaskSchedulerBinding 记录任务与 Dolphin 项目/工作流/节点的绑定,不保存上下游。 TaskSchedulerBinding records the task-to-Dolphin project/workflow/node mapping without upstream/downstream.
func (TaskSchedulerBinding) TableName ¶ added in v1.2.0
func (TaskSchedulerBinding) TableName() string
TableName 指定任务调度绑定表名。 TableName specifies the task scheduler binding table.
type TaskStatus ¶
type TaskStatus string
TaskStatus represents sync task lifecycle status. TaskStatus 表示同步任务生命周期状态。
const ( TaskStatusDraft TaskStatus = "draft" TaskStatusPublished TaskStatus = "published" TaskStatusArchived TaskStatus = "archived" )
type TaskTimeoutDefaults ¶ added in v1.3.0
type TaskTimeoutDefaults struct {
SubmitTimeoutSeconds int `json:"submit_timeout_seconds"`
StopTimeoutSeconds int `json:"stop_timeout_seconds"`
}
TaskTimeoutDefaults 是任务详情里附带的全局超时默认值,供任务设置的占位提示使用。 TaskTimeoutDefaults carries the global timeout defaults on task responses for the settings placeholders.
type TaskTreeData ¶
type TaskTreeData struct {
Items []*TaskTreeNode `json:"items"`
}
TaskTreeData represents tree response payload.
type TaskTreeNode ¶
type TaskTreeNode struct {
ID uint `json:"id"`
ParentID *uint `json:"parent_id,omitempty"`
NodeType TaskNodeType `json:"node_type"`
Name string `json:"name"`
Description string `json:"description"`
ClusterID uint `json:"cluster_id"`
EngineVersion string `json:"engine_version"`
Mode TaskMode `json:"mode"`
Status TaskStatus `json:"status"`
ContentFormat ContentFormat `json:"content_format"`
Content string `json:"content"`
JobName string `json:"job_name"`
Definition JSONMap `json:"definition"`
SortOrder int `json:"sort_order"`
CurrentVersion int `json:"current_version"`
ScheduleEnabled bool `json:"schedule_enabled,omitempty"`
ScheduleCronExpr string `json:"schedule_cron_expr,omitempty"`
ScheduleTimezone string `json:"schedule_timezone,omitempty"`
ScheduleLastTriggeredAt *time.Time `json:"schedule_last_triggered_at,omitempty"`
ScheduleNextTriggeredAt *time.Time `json:"schedule_next_triggered_at,omitempty"`
CreatedBy uint `json:"created_by"`
CanEdit bool `json:"can_edit"`
CanRun bool `json:"can_run"`
IsOwner bool `json:"is_owner"`
IsCollaborator bool `json:"is_collaborator"`
IsPublicTask bool `json:"is_public"`
Children []*TaskTreeNode `json:"children,omitempty"`
}
TaskTreeNode represents one node in the sync workspace tree.
type TaskTreeResponse ¶
type TaskTreeResponse struct {
ErrorMsg string `json:"error_msg"`
Data *TaskTreeData `json:"data"`
}
type TaskVersion ¶
type TaskVersion struct {
ID uint `json:"id" gorm:"primaryKey;autoIncrement"`
TaskID uint `json:"task_id" gorm:"index;not null"`
Version int `json:"version" gorm:"not null"`
NameSnapshot string `json:"name_snapshot" gorm:"size:120"`
DescriptionSnapshot string `json:"description_snapshot" gorm:"type:text"`
ClusterIDSnapshot uint `json:"cluster_id_snapshot"`
EngineVersionSnapshot string `json:"engine_version_snapshot" gorm:"size:50"`
ModeSnapshot TaskMode `json:"mode_snapshot" gorm:"size:20"`
ContentFormatSnapshot ContentFormat `json:"content_format_snapshot" gorm:"size:20"`
// ContentSnapshot 存储版本快照内容(HOCON 或 JSON);MySQL 用 MEDIUMTEXT,PG/SQLite 用 TEXT。
// ContentSnapshot stores version snapshot (HOCON/JSON); MySQL uses MEDIUMTEXT, PG/SQLite use TEXT.
ContentSnapshot db.ScriptText `json:"content_snapshot"`
JobNameSnapshot string `json:"job_name_snapshot" gorm:"size:255"`
DefinitionSnapshot JSONMap `json:"definition_snapshot" gorm:"type:json"`
Comment string `json:"comment" gorm:"size:255"`
CreatedBy uint `json:"created_by"`
CreatedAt time.Time `json:"created_at" gorm:"autoCreateTime"`
}
TaskVersion stores one immutable snapshot of a sync file task. TaskVersion 存储同步文件任务的一次不可变快照。
func (TaskVersion) TableName ¶
func (TaskVersion) TableName() string
TableName returns the sync task version table name. TableName 返回同步任务版本表名。
type TaskVersionListData ¶
type TaskVersionListData struct {
Total int64 `json:"total"`
Items []*TaskVersion `json:"items"`
}
TaskVersionListData represents paginated task versions.
type TaskVersionListResponse ¶
type TaskVersionListResponse struct {
ErrorMsg string `json:"error_msg"`
Data *TaskVersionListData `json:"data"`
}
type TaskVersionResponse ¶
type TaskVersionResponse struct {
ErrorMsg string `json:"error_msg"`
Data *TaskVersion `json:"data"`
}
type UpdateCuratedTemplateRequest ¶ added in v1.0.0
type UpdateCuratedTemplateRequest struct {
Name *string `json:"name"`
Description *string `json:"description"`
Section *string `json:"section"`
Mode *string `json:"mode"`
Pattern *string `json:"pattern"`
Connectors []string `json:"connectors"`
Content *string `json:"content"`
Enabled *bool `json:"enabled"`
}
UpdateCuratedTemplateRequest updates one user curated template. UpdateCuratedTemplateRequest 更新一条用户精选模板。
type UpdateEventChannelRequest ¶ added in v1.3.0
type UpdateEventChannelRequest struct {
Enabled *bool `json:"enabled"`
RotateToken bool `json:"rotate_token"`
}
UpdateEventChannelRequest 是 PUT /api/v1/sync/event-channels/:cluster_id 的请求体。 UpdateEventChannelRequest is the body of PUT /api/v1/sync/event-channels/:cluster_id.
type UpdateGlobalVariableRequest ¶
type UpdateGlobalVariableRequest struct {
Key string `json:"key" binding:"required"`
Value string `json:"value"`
ValueType string `json:"value_type"`
Description string `json:"description"`
}
UpdateGlobalVariableRequest represents one global variable update payload. UpdateGlobalVariableRequest 表示更新全局变量请求体。
type UpdateTaskPermissionsRequest ¶ added in v1.0.0
type UpdateTaskPermissionsRequest struct {
IsPublic *bool `json:"is_public"`
CollaboratorIDs []uint `json:"collaborator_ids"`
}
UpdateTaskPermissionsRequest 表示一次只修改共享权限字段的请求。 UpdateTaskPermissionsRequest represents a partial sharing-permission update.
type UpdateTaskRequest ¶
type UpdateTaskRequest struct {
ParentID *uint `json:"parent_id"`
NodeType string `json:"node_type"`
Name string `json:"name" binding:"required"`
Description string `json:"description"`
ClusterID uint `json:"cluster_id"`
EngineVersion string `json:"engine_version"`
Mode string `json:"mode"`
ContentFormat string `json:"content_format"`
Content string `json:"content"`
JobName string `json:"job_name"`
SortOrder int `json:"sort_order"`
Definition JSONMap `json:"definition"`
}
UpdateTaskRequest represents the payload for updating a sync workspace node.
type ValidateCheck ¶
type ValidateCheck struct {
NodeID string `json:"node_id"`
Kind string `json:"kind"`
ConnectorType string `json:"connector_type"`
Target string `json:"target,omitempty"`
ProbeMethod string `json:"probe_method,omitempty"`
Status string `json:"status"`
Message string `json:"message"`
}
ValidateCheck 表示单个连接器配置/连接探测校验结果条目。 ValidateCheck represents one connector config/connection validation entry.
type ValidateResponse ¶
type ValidateResponse struct {
ErrorMsg string `json:"error_msg"`
Data *ValidateResult `json:"data"`
}
type ValidateResult ¶
type ValidateResult struct {
Valid bool `json:"valid"`
Errors []string `json:"errors"`
Warnings []string `json:"warnings"`
Summary string `json:"summary"`
Resolved map[string]string `json:"resolved,omitempty"`
DetectedVars []string `json:"detected_vars,omitempty"`
DetectedFiles []string `json:"detected_files,omitempty"`
Checks []ValidateCheck `json:"checks,omitempty"`
}
ValidateResult represents validation result payload.
Source Files
¶
- alert_signals.go
- builtin_time_variables.go
- cdc_delay_alert.go
- cluster_running_jobs.go
- config_tool_client.go
- curated_seed.go
- curated_service.go
- dolphin_client.go
- dolphin_graph.go
- dolphin_push.go
- dolphin_script.go
- dolphin_version.go
- engine_call_outcome.go
- engine_client.go
- engine_client_realtime.go
- engine_events.go
- engine_events_handler.go
- engine_events_model.go
- engine_events_repository.go
- err.go
- execution.go
- failed_error_backfill.go
- handler.go
- handler_curated_template.go
- handler_dolphin.go
- handler_plugin_template.go
- job_engine_sync.go
- job_metrics_collector.go
- job_metrics_log.go
- job_prometheus.go
- job_reconciler.go
- job_reconciler_scheduler.go
- job_timeseries.go
- jobid.go
- model.go
- observability_inject.go
- plan_dag.go
- plugin_template.go
- preview_order.go
- realtime.go
- repository.go
- repository_scheduler.go
- runtime_support.go
- scheduler.go
- secrets.go
- service.go
- submit_attach.go
- submit_options.go
- submit_outcome.go
- task_alert.go
- task_schedule.go
- types.go