Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ContainerTakeDown ¶
type ContainerTakeDown interface {
Calculate(state ContainerTakeDownState) []container.IContainer
}
func ProvideOverResourceUsageContainerTakeDown ¶
func ProvideOverResourceUsageContainerTakeDown() ContainerTakeDown
type ContainerTakeDownState ¶
type ContainerTakeDownState struct { ContainerBuffer datastructure.Buffer[string, container.IContainer] Report *models.CheckResourceReport // nolint:unused }
type DistributionResult ¶
type DistributionResult struct {
CreateContainerToSupportTask bool
}
type OverResourceUsageContainerTakeDown ¶
type OverResourceUsageContainerTakeDown struct{}
func (OverResourceUsageContainerTakeDown) Calculate ¶
func (o OverResourceUsageContainerTakeDown) Calculate(state ContainerTakeDownState) (removeContainer []container.IContainer)
Calculate check the container which one should be shutdown. Don't call stop container in this function, Instead, Just return it and let the caller handle it instead
type WorkerDistributor ¶
type WorkerDistributor interface {
Distribute(ctx context.Context, task models.Task, workerState WorkerState) DistributionResult
}
func ProvideDelayWorkerDistributor ¶
func ProvideDelayWorkerDistributor(config config.WorkerConfigModel) WorkerDistributor
type WorkerState ¶
type WorkerState struct { ContainerCoolDownState datastructure.Buffer[string, time.Time] WorkerNodeConfig config.WorkerConfigModel ContainerBuffer datastructure.Buffer[string, container.IContainer] }
Click to show internal directories.
Click to hide internal directories.