Documentation ¶
Index ¶
- Constants
- Variables
- type DownstreamRepository
- type Engine
- type EventHandler
- type JobDeploymentService
- type 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
- type 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
- type PluginService
- type Scheduler
- type TenantDetailsGetter
- type UpstreamRepository
- type UpstreamResolver
Constants ¶
View Source
const ( ConcurrentTicketPerSec = 50 ConcurrentLimit = 100 )
View Source
const (
TimeISOFormat = time.RFC3339
)
Variables ¶
View Source
var ( ErrUpstreamModNotFound = errors.New("upstream mod not found for plugin") ErrYamlModNotExist = errors.New("yaml mod not found for plugin") )
Functions ¶
This section is empty.
Types ¶
type DownstreamRepository ¶
type DownstreamRepository interface { GetDownstreamByDestination(ctx context.Context, projectName tenant.ProjectName, destination job.ResourceURN) ([]*job.Downstream, error) GetDownstreamByJobName(ctx context.Context, projectName tenant.ProjectName, jobName job.Name) ([]*job.Downstream, error) GetDownstreamBySources(ctx context.Context, sources []job.ResourceURN) ([]*job.Downstream, error) }
type EventHandler ¶
type JobDeploymentService ¶
type JobPluginService ¶
type JobPluginService struct {
// contains filtered or unexported fields
}
func NewJobPluginService ¶
func NewJobPluginService(pluginRepo PluginRepo, engine Engine, logger log.Logger) *JobPluginService
func (JobPluginService) GenerateDestination ¶
func (p JobPluginService) GenerateDestination(ctx context.Context, tnnt *tenant.WithDetails, task job.Task) (job.ResourceURN, error)
func (JobPluginService) GenerateUpstreams ¶
func (p JobPluginService) GenerateUpstreams(ctx context.Context, jobTenant *tenant.WithDetails, spec *job.Spec, dryRun bool) ([]job.ResourceURN, error)
type JobRepository ¶
type JobRepository interface { // TODO: remove `savedJobs` since the method's main purpose is to add, not to get 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 ChangeJobNamespace(ctx context.Context, jobName job.Name, tenant, newTenant tenant.Tenant) error GetByJobName(ctx context.Context, projectName tenant.ProjectName, jobName job.Name) (*job.Job, error) GetAllByResourceDestination(ctx context.Context, resourceDestination job.ResourceURN) ([]*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 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, scheduler Scheduler, ) *JobService
func (*JobService) ChangeNamespace ¶
func (*JobService) GetByFilter ¶
func (*JobService) GetDownstream ¶
func (j *JobService) GetDownstream(ctx context.Context, subjectJob *job.Job, localJob bool) ([]*job.Downstream, 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 ¶
func (j *JobService) RefreshResourceDownstream(ctx context.Context, resourceURNs []job.ResourceURN, logWriter writer.LogWriter) error
func (*JobService) ReplaceAll ¶
func (*JobService) UpdateState ¶
type PluginService ¶
type PluginService interface { Info(context.Context, job.TaskName) (*plugin.Info, error) GenerateDestination(context.Context, *tenant.WithDetails, job.Task) (job.ResourceURN, error) GenerateUpstreams(ctx context.Context, jobTenant *tenant.WithDetails, spec *job.Spec, dryRun bool) ([]job.ResourceURN, error) }
type TenantDetailsGetter ¶
type UpstreamRepository ¶
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 ¶
Click to show internal directories.
Click to hide internal directories.