Documentation ¶
Index ¶
- Constants
- type AlertManager
- type ChangeLogService
- type DownstreamRepository
- type Engine
- type EventHandler
- type JobDeploymentService
- type JobRepository
- type JobRunInputCompiler
- type JobService
- func (j *JobService) Add(ctx context.Context, jobTenant tenant.Tenant, specs []*job.Spec) ([]job.Name, error)
- func (j *JobService) BulkDeleteJobs(ctx context.Context, projectName tenant.ProjectName, ...) (map[string]dto.BulkDeleteTracker, error)
- func (j *JobService) ChangeNamespace(ctx context.Context, jobTenant, jobNewTenant tenant.Tenant, jobName job.Name) error
- func (j *JobService) Delete(ctx context.Context, jobTenant tenant.Tenant, jobName job.Name, ...) (affectedDownstream []job.FullName, err error)
- func (j *JobService) Get(ctx context.Context, jobTenant tenant.Tenant, jobName job.Name) (*job.Job, error)
- func (j *JobService) GetByFilter(ctx context.Context, filters ...filter.FilterOpt) ([]*job.Job, error)
- func (j *JobService) GetDownstream(ctx context.Context, subjectJob *job.Job, localJob bool) ([]*job.Downstream, error)
- func (j *JobService) GetDownstreamByResourceURN(ctx context.Context, tnnt tenant.Tenant, urn resource.URN) (job.DownstreamList, error)
- func (j *JobService) GetJobBasicInfo(ctx context.Context, jobTenant tenant.Tenant, jobName job.Name, spec *job.Spec) (*job.Job, writer.BufferedLogger)
- func (j *JobService) GetTaskInfo(ctx context.Context, task job.Task) (*plugin.Info, error)
- func (j *JobService) GetUpstreamsToInspect(ctx context.Context, subjectJob *job.Job, localJob bool) ([]*job.Upstream, error)
- func (j *JobService) Refresh(ctx context.Context, projectName tenant.ProjectName, ...) (err error)
- func (j *JobService) RefreshResourceDownstream(ctx context.Context, resourceURNs []resource.URN, logWriter writer.LogWriter) error
- func (j *JobService) ReplaceAll(ctx context.Context, jobTenant tenant.Tenant, specs []*job.Spec, ...) error
- func (j *JobService) SyncState(ctx context.Context, jobTenant tenant.Tenant, ...) error
- func (j *JobService) Update(ctx context.Context, jobTenant tenant.Tenant, specs []*job.Spec) ([]job.Name, error)
- func (j *JobService) UpdateState(ctx context.Context, jobTenant tenant.Tenant, jobNames []job.Name, ...) error
- func (j *JobService) Upsert(ctx context.Context, jobTenant tenant.Tenant, specs []*job.Spec) ([]dto.UpsertResult, error)
- func (j *JobService) Validate(ctx context.Context, request dto.ValidateRequest) (map[job.Name][]dto.ValidateResult, error)
- type PluginService
- type ResourceExistenceChecker
- type TenantDetailsGetter
- type UpstreamRepository
- type UpstreamResolver
Constants ¶
View Source
const ( ConcurrentTicketPerSec = 50 ConcurrentLimit = 100 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AlertManager ¶ added in v0.16.2
type AlertManager interface {
SendJobEvent(attr *job.AlertAttrs)
}
type ChangeLogService ¶ added in v0.13.0
type ChangeLogService struct {
// contains filtered or unexported fields
}
func NewChangeLogService ¶ added in v0.13.0
func NewChangeLogService(jobRepo JobRepository) *ChangeLogService
func (*ChangeLogService) GetChangelog ¶ added in v0.13.0
func (cl *ChangeLogService) GetChangelog(ctx context.Context, projectName tenant.ProjectName, jobName job.Name) ([]*job.ChangeLog, error)
type DownstreamRepository ¶ added in v0.9.0
type DownstreamRepository interface { GetDownstreamByDestination(ctx context.Context, projectName tenant.ProjectName, destination resource.URN) ([]*job.Downstream, error) GetDownstreamByJobName(ctx context.Context, projectName tenant.ProjectName, jobName job.Name) ([]*job.Downstream, error) GetDownstreamBySources(ctx context.Context, sources []resource.URN) ([]*job.Downstream, error) }
type EventHandler ¶ added in v0.7.0
type JobDeploymentService ¶ added in v0.8.0
type JobRepository ¶
type JobRepository interface { Add(context.Context, []*job.Job) (addedJobs []*job.Job, err error) Update(context.Context, []*job.Job) (updatedJobs []*job.Job, err error) Delete(ctx context.Context, projectName tenant.ProjectName, jobName job.Name, cleanHistory bool) error SetDirty(ctx context.Context, jobsTenant tenant.Tenant, jobNames []job.Name, isDirty bool) error ChangeJobNamespace(ctx context.Context, jobName job.Name, tenant, newTenant tenant.Tenant) error GetChangelog(ctx context.Context, projectName tenant.ProjectName, jobName job.Name) ([]*job.ChangeLog, error) GetByJobName(ctx context.Context, projectName tenant.ProjectName, jobName job.Name) (*job.Job, error) GetAllByResourceDestination(ctx context.Context, resourceDestination resource.URN) ([]*job.Job, error) GetAllByTenant(ctx context.Context, jobTenant tenant.Tenant) ([]*job.Job, error) GetAllByProjectName(ctx context.Context, projectName tenant.ProjectName) ([]*job.Job, error) SyncState(ctx context.Context, jobTenant tenant.Tenant, disabledJobNames, enabledJobNames []job.Name) error UpdateState(ctx context.Context, jobTenant tenant.Tenant, jobNames []job.Name, jobState job.State, remark string) error }
type JobRunInputCompiler ¶ added in v0.12.0
type JobService ¶
type JobService struct {
// contains filtered or unexported fields
}
func NewJobService ¶
func NewJobService( jobRepo JobRepository, upstreamRepo UpstreamRepository, downstreamRepo DownstreamRepository, pluginService PluginService, upstreamResolver UpstreamResolver, tenantDetailsGetter TenantDetailsGetter, eventHandler EventHandler, logger log.Logger, jobDeploymentService JobDeploymentService, engine Engine, jobInputCompiler JobRunInputCompiler, resourceChecker ResourceExistenceChecker, alertHandler AlertManager, ) *JobService
func (*JobService) BulkDeleteJobs ¶ added in v0.16.0
func (j *JobService) BulkDeleteJobs(ctx context.Context, projectName tenant.ProjectName, jobsToDelete []*dto.JobToDeleteRequest) (map[string]dto.BulkDeleteTracker, error)
func (*JobService) ChangeNamespace ¶ added in v0.8.0
func (*JobService) GetByFilter ¶
func (*JobService) GetDownstream ¶
func (j *JobService) GetDownstream(ctx context.Context, subjectJob *job.Job, localJob bool) ([]*job.Downstream, error)
func (*JobService) GetDownstreamByResourceURN ¶ added in v0.12.0
func (j *JobService) GetDownstreamByResourceURN(ctx context.Context, tnnt tenant.Tenant, urn resource.URN) (job.DownstreamList, error)
func (*JobService) GetJobBasicInfo ¶
func (*JobService) GetTaskInfo ¶
func (*JobService) GetUpstreamsToInspect ¶
func (*JobService) Refresh ¶
func (j *JobService) Refresh(ctx context.Context, projectName tenant.ProjectName, namespaceNames, jobNames []string, logWriter writer.LogWriter) (err error)
func (*JobService) RefreshResourceDownstream ¶ added in v0.9.0
func (*JobService) ReplaceAll ¶
func (*JobService) UpdateState ¶ added in v0.9.0
func (*JobService) Upsert ¶ added in v0.14.0
func (j *JobService) Upsert(ctx context.Context, jobTenant tenant.Tenant, specs []*job.Spec) ([]dto.UpsertResult, error)
func (*JobService) Validate ¶
func (j *JobService) Validate(ctx context.Context, request dto.ValidateRequest) (map[job.Name][]dto.ValidateResult, error)
type PluginService ¶
type PluginService interface { Info(ctx context.Context, taskName string) (*plugin.Info, error) IdentifyUpstreams(ctx context.Context, taskName string, compiledConfig, assets map[string]string) (resourceURNs []resource.URN, err error) ConstructDestinationURN(ctx context.Context, taskName string, compiledConfig map[string]string) (destinationURN resource.URN, err error) }
type ResourceExistenceChecker ¶ added in v0.12.0
type TenantDetailsGetter ¶
type UpstreamRepository ¶ added in v0.9.0
type UpstreamRepository interface { ResolveUpstreams(context.Context, tenant.ProjectName, []job.Name) (map[job.Name][]*job.Upstream, error) ReplaceUpstreams(context.Context, []*job.WithUpstream) error GetUpstreams(ctx context.Context, projectName tenant.ProjectName, jobName job.Name) ([]*job.Upstream, error) }
type UpstreamResolver ¶
type UpstreamResolver interface { CheckStaticResolvable(ctx context.Context, tnnt tenant.Tenant, jobs []*job.Job, logWriter writer.LogWriter) error BulkResolve(ctx context.Context, projectName tenant.ProjectName, jobs []*job.Job, logWriter writer.LogWriter) (jobWithUpstreams []*job.WithUpstream, err error) Resolve(ctx context.Context, subjectJob *job.Job, logWriter writer.LogWriter) ([]*job.Upstream, error) }
Click to show internal directories.
Click to hide internal directories.