Documentation ¶
Index ¶
- Constants
- Variables
- func NewContext() context.Context
- func NewProcessor(datasourceProxy *datasource.Proxy, lister v1alpha1.ResourceRecommendLister) processor.Processor
- type Processor
- func (p *Processor) Cancel(processKey *processortypes.ProcessKey) (cErr *errortypes.CustomError)
- func (p *Processor) GarbageCollector(ctx context.Context)
- func (p *Processor) ProcessTasks(ctx context.Context)
- func (p *Processor) QueryProcessedValues(processKey *processortypes.ProcessKey) (float64, error)
- func (p *Processor) Register(processConfig *processortypes.ProcessConfig) (cErr *errortypes.CustomError)
- func (p *Processor) Run(ctx context.Context)
Constants ¶
Variables ¶
View Source
var DefaultQueueRateLimiter = workqueue.NewMaxOfRateLimiter( workqueue.NewItemExponentialFailureRateLimiter(ExceptionRequeueBaseDelay, ExceptionRequeueMaxDelay), &workqueue.BucketRateLimiter{Limiter: rate.NewLimiter(rate.Limit(10), 100)}, )
Functions ¶
func NewContext ¶
func NewProcessor ¶
func NewProcessor(datasourceProxy *datasource.Proxy, lister v1alpha1.ResourceRecommendLister) processor.Processor
Types ¶
type Processor ¶
type Processor struct { Lister v1alpha1.ResourceRecommendLister DatasourceProxy *datasource.Proxy TaskQueue workqueue.RateLimitingInterface AggregateTasks *sync.Map // Stores taskID corresponding to Metrics in the ResourceRecommend ResourceRecommendTaskIDsMap map[types.NamespacedName]*map[datasourcetypes.Metric]processortypes.TaskID // contains filtered or unexported fields }
func (*Processor) Cancel ¶
func (p *Processor) Cancel(processKey *processortypes.ProcessKey) (cErr *errortypes.CustomError)
func (*Processor) GarbageCollector ¶
func (*Processor) ProcessTasks ¶
func (*Processor) QueryProcessedValues ¶
func (p *Processor) QueryProcessedValues(processKey *processortypes.ProcessKey) (float64, error)
func (*Processor) Register ¶
func (p *Processor) Register(processConfig *processortypes.ProcessConfig) (cErr *errortypes.CustomError)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.