Versions in this module Expand all Collapse all v0 v0.7.1 Jul 25, 2023 v0.7.0 Jul 20, 2023 Changes in this version + const ConcurrentLimit + const ConcurrentTicketPerSec + const TimeISOFormat + var ErrUpstreamModNotFound = errors.New("upstream mod not found for plugin") + var ErrYamlModNotExist = errors.New("yaml mod not found for plugin") + type DownstreamRepository interface + GetDownstreamByDestination func(ctx context.Context, projectName tenant.ProjectName, ...) ([]*job.Downstream, error) + GetDownstreamByJobName func(ctx context.Context, projectName tenant.ProjectName, jobName job.Name) ([]*job.Downstream, error) + GetDownstreamBySources func(ctx context.Context, sources []job.ResourceURN) ([]*job.Downstream, error) + type Engine interface + Compile func(templateMap map[string]string, context map[string]any) (map[string]string, error) + CompileString func(input string, context map[string]any) (string, error) + type EventHandler interface + HandleEvent func(moderator.Event) + type JobDeploymentService interface + UploadJobs func(ctx context.Context, jobTenant tenant.Tenant, toUpdate, toDelete []string) error + type JobPluginService struct + func NewJobPluginService(pluginRepo PluginRepo, engine Engine, logger log.Logger) *JobPluginService + func (p JobPluginService) GenerateDestination(ctx context.Context, tnnt *tenant.WithDetails, task job.Task) (job.ResourceURN, error) + func (p JobPluginService) GenerateUpstreams(ctx context.Context, jobTenant *tenant.WithDetails, spec *job.Spec, ...) ([]job.ResourceURN, error) + func (p JobPluginService) Info(_ context.Context, taskName job.TaskName) (*plugin.Info, error) + type JobRepository interface + Add func(context.Context, []*job.Job) (addedJobs []*job.Job, err error) + ChangeJobNamespace func(ctx context.Context, jobName job.Name, tenant, newTenant tenant.Tenant) error + Delete func(ctx context.Context, projectName tenant.ProjectName, jobName job.Name, ...) error + GetAllByProjectName func(ctx context.Context, projectName tenant.ProjectName) ([]*job.Job, error) + GetAllByResourceDestination func(ctx context.Context, resourceDestination job.ResourceURN) ([]*job.Job, error) + GetAllByTenant func(ctx context.Context, jobTenant tenant.Tenant) ([]*job.Job, error) + GetByJobName func(ctx context.Context, projectName tenant.ProjectName, jobName job.Name) (*job.Job, error) + SyncState func(ctx context.Context, jobTenant tenant.Tenant, ...) error + Update func(context.Context, []*job.Job) (updatedJobs []*job.Job, err error) + UpdateState func(ctx context.Context, jobTenant tenant.Tenant, jobNames []job.Name, ...) error + type JobService struct + func NewJobService(jobRepo JobRepository, upstreamRepo UpstreamRepository, ...) *JobService + func (j *JobService) Add(ctx context.Context, jobTenant tenant.Tenant, specs []*job.Spec) 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) 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 []job.ResourceURN, ...) 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) error + func (j *JobService) UpdateState(ctx context.Context, jobTenant tenant.Tenant, jobNames []job.Name, ...) error + func (j *JobService) Validate(ctx context.Context, jobTenant tenant.Tenant, jobSpecs []*job.Spec, ...) error + type PluginRepo interface + GetByName func(string) (*plugin.Plugin, error) + type PluginService interface + GenerateDestination func(context.Context, *tenant.WithDetails, job.Task) (job.ResourceURN, error) + GenerateUpstreams func(ctx context.Context, jobTenant *tenant.WithDetails, spec *job.Spec, ...) ([]job.ResourceURN, error) + Info func(context.Context, job.TaskName) (*plugin.Info, error) + type Scheduler interface + UpdateJobState func(ctx context.Context, tnnt tenant.Tenant, jobName []job.Name, state string) error + type TenantDetailsGetter interface + GetDetails func(ctx context.Context, jobTenant tenant.Tenant) (*tenant.WithDetails, error) + type UpstreamRepository interface + GetUpstreams func(ctx context.Context, projectName tenant.ProjectName, jobName job.Name) ([]*job.Upstream, error) + ReplaceUpstreams func(context.Context, []*job.WithUpstream) error + ResolveUpstreams func(context.Context, tenant.ProjectName, []job.Name) (map[job.Name][]*job.Upstream, error) + type UpstreamResolver interface + BulkResolve func(ctx context.Context, projectName tenant.ProjectName, jobs []*job.Job, ...) (jobWithUpstreams []*job.WithUpstream, err error) + Resolve func(ctx context.Context, subjectJob *job.Job, logWriter writer.LogWriter) ([]*job.Upstream, error)