Documentation ¶
Index ¶
- Constants
- func NewExternalUpstreamResolver(resourceManagerConfigs []config.ResourceManager) (*extUpstreamResolver, error)
- func NewInternalUpstreamResolver(jobRepository JobRepository) *internalUpstreamResolver
- type ExternalUpstreamResolver
- type InternalUpstreamResolver
- type JobRepository
- type ResourceManager
- type UpstreamResolver
- func (u UpstreamResolver) BulkResolve(ctx context.Context, projectName tenant.ProjectName, jobs []*job.Job, ...) ([]*job.WithUpstream, error)
- func (u UpstreamResolver) CheckStaticResolvable(ctx context.Context, tnnt tenant.Tenant, incomingJobs []*job.Job, ...) error
- func (u UpstreamResolver) Resolve(ctx context.Context, subjectJob *job.Job, logWriter writer.LogWriter) ([]*job.Upstream, error)
Constants ¶
View Source
const ( ConcurrentTicketPerSec = 50 ConcurrentLimit = 100 )
Variables ¶
This section is empty.
Functions ¶
func NewExternalUpstreamResolver ¶
func NewExternalUpstreamResolver(resourceManagerConfigs []config.ResourceManager) (*extUpstreamResolver, error)
NewExternalUpstreamResolver creates a new instance of externalUpstreamResolver
func NewInternalUpstreamResolver ¶
func NewInternalUpstreamResolver(jobRepository JobRepository) *internalUpstreamResolver
Types ¶
type ExternalUpstreamResolver ¶
type ExternalUpstreamResolver interface { Resolve(ctx context.Context, jobWithUpstream *job.WithUpstream, lw writer.LogWriter) (*job.WithUpstream, error) BulkResolve(context.Context, []*job.WithUpstream, writer.LogWriter) ([]*job.WithUpstream, error) }
func NewTestExternalUpstreamResolver ¶
func NewTestExternalUpstreamResolver( optimusResourceManagers []resourcemanager.ResourceManager, ) ExternalUpstreamResolver
type InternalUpstreamResolver ¶
type InternalUpstreamResolver interface { Resolve(context.Context, *job.WithUpstream) (*job.WithUpstream, error) BulkResolve(context.Context, tenant.ProjectName, []*job.WithUpstream) ([]*job.WithUpstream, error) }
type JobRepository ¶
type JobRepository interface { ResolveUpstreams(ctx context.Context, projectName tenant.ProjectName, jobNames []job.Name) (map[job.Name][]*job.Upstream, error) GetAllByResourceDestination(ctx context.Context, resourceDestination job.ResourceURN) ([]*job.Job, error) GetByJobName(ctx context.Context, projectName tenant.ProjectName, jobName job.Name) (*job.Job, error) }
type ResourceManager ¶
type UpstreamResolver ¶
type UpstreamResolver struct {
// contains filtered or unexported fields
}
func NewUpstreamResolver ¶
func NewUpstreamResolver(jobRepository JobRepository, externalUpstreamResolver ExternalUpstreamResolver, internalUpstreamResolver InternalUpstreamResolver) *UpstreamResolver
func (UpstreamResolver) BulkResolve ¶
func (u UpstreamResolver) BulkResolve(ctx context.Context, projectName tenant.ProjectName, jobs []*job.Job, logWriter writer.LogWriter) ([]*job.WithUpstream, error)
func (UpstreamResolver) CheckStaticResolvable ¶ added in v0.11.0
Click to show internal directories.
Click to hide internal directories.