pool

package
v0.0.15 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaximumUnavailableCount  = 3
	AvailabilityCheckTimeout = 5 * time.Second
)

Variables

View Source
var (
	ErrNoAvailableWorkerNode  = errors.New("no available worker node in the pool")
	ErrNoAvailableDistributor = errors.New("no distributor available")
)

Functions

This section is empty.

Types

type InitialWorkerNodeSet

type InitialWorkerNodeSet []models.NodeEntry

type WorkerNode

type WorkerNode interface {
	InitializePool(ctx context.Context, nodeEntries []models.NodeEntry)
	AddWorkerNode(ctx context.Context, node models.NodeEntry) error
	WorkerNodeAvailabilityCheck(ctx context.Context)
	DistributeWork(ctx context.Context, jobID models.Job, tasks []models.Task) ([]models.Task, []models.DistributeError, error)
	IsAvailableWorkerNode() bool
	RemoveNodeFromPool(ctx context.Context, nodeID string)
	CheckRunningTaskInEachWorkerNode(ctx context.Context) map[primitive.ObjectID]bool
}

func ProvideWorkerNode

func ProvideWorkerNode(caCertificate cert.CACertificate, distributorMapper distribution.DistributorMapper, grpcResolver grpc.RAJDSGRPCResolver, meter metric.Meter) WorkerNode

Directories

Path Synopsis
Package mock_pool is a generated GoMock package.
Package mock_pool is a generated GoMock package.

Jump to

Keyboard shortcuts

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