types

package
v1.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SuccessValidateResult = apistructs.PipelineQueueValidateResult{Success: true}

Functions

This section is empty.

Types

type Queue

type Queue interface {
	QueueValidator
	Start(stopCh chan struct{})
	ID() string
	IsStrictMode() bool
	Usage() pb.QueueUsage
	Update(pq *apistructs.PipelineQueue)
	RangePendingQueue()
	AddPipelineIntoQueue(p *spec.Pipeline, doneCh chan struct{})
	PopOutPipeline(p *spec.Pipeline)
	BatchUpdatePipelinePriorityInQueue(pipelines []*spec.Pipeline) error
	snapshot.Snapshot
}

type QueueManager

type QueueManager interface {
	IdempotentAddQueue(pq *apistructs.PipelineQueue) Queue
	QueryQueueUsage(pq *apistructs.PipelineQueue) *pb.QueueUsage
	PutPipelineIntoQueue(pipelineID uint64) (popCh <-chan struct{}, needRetryIfErr bool, err error)
	PopOutPipelineFromQueue(pipelineID uint64)
	BatchUpdatePipelinePriorityInQueue(pq *apistructs.PipelineQueue, pipelineIDs []uint64) error
	Stop()
	SendQueueToEtcd(queueID uint64)
	ListenInputQueueFromEtcd(ctx context.Context)
	SendUpdatePriorityPipelineIDsToEtcd(queueID uint64, pipelineIDS []uint64)
	ListenUpdatePriorityPipelineIDsFromEtcd(ctx context.Context)
	snapshot.Snapshot
}

QueueManager manage all queues and related pipelines.

type QueueValidator

type QueueValidator interface {
	ValidateCapacity(tryPop *spec.Pipeline) apistructs.PipelineQueueValidateResult
	ValidateFreeResources(tryPop *spec.Pipeline) apistructs.PipelineQueueValidateResult
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL