service

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2021 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClusterAllocationService

type ClusterAllocationService struct {
	// contains filtered or unexported fields
}

func NewClusterAllocationService

func NewClusterAllocationService(
	clusterContext context.ClusterContext,
	eventReporter reporter.EventReporter,
	leaseService LeaseService,
	utilisationService utilisation.UtilisationService,
	submitter job.Submitter) *ClusterAllocationService

func (*ClusterAllocationService) AllocateSpareClusterCapacity

func (allocationService *ClusterAllocationService) AllocateSpareClusterCapacity()

type JobLeaseService

type JobLeaseService struct {
	// contains filtered or unexported fields
}

func NewJobLeaseService

func NewJobLeaseService(
	clusterIdentity context2.ClusterIdentity,
	queueClient api.AggregatedQueueClient,
	minimumJobSize common.ComputeResources) *JobLeaseService

func (*JobLeaseService) RenewJobLeases added in v0.1.40

func (jobLeaseService *JobLeaseService) RenewJobLeases(jobs []*job.RunningJob) ([]*job.RunningJob, error)

func (*JobLeaseService) ReportDone

func (jobLeaseService *JobLeaseService) ReportDone(jobIds []string) error

func (*JobLeaseService) RequestJobLeases

func (jobLeaseService *JobLeaseService) RequestJobLeases(availableResource *common.ComputeResources, nodes []api.NodeInfo, leasedResourceByQueue map[string]common.ComputeResources) ([]*api.Job, error)

func (*JobLeaseService) ReturnLease

func (jobLeaseService *JobLeaseService) ReturnLease(pod *v1.Pod) error

type JobManager added in v0.1.40

type JobManager struct {
	// contains filtered or unexported fields
}

func NewJobManager added in v0.1.40

func NewJobManager(
	clusterIdentity context2.ClusterIdentity,
	jobContext job.JobContext,
	eventReporter reporter.EventReporter,
	jobLeaseService LeaseService,
	minimumPodAge time.Duration,
	failedPodExpiry time.Duration) *JobManager

func (*JobManager) ManageJobLeases added in v0.1.40

func (m *JobManager) ManageJobLeases()

type LeaseService

type LeaseService interface {
	ReturnLease(pod *v1.Pod) error
	RequestJobLeases(availableResource *common.ComputeResources, nodes []api.NodeInfo, leasedResourceByQueue map[string]common.ComputeResources) ([]*api.Job, error)
	RenewJobLeases(jobs []*job.RunningJob) ([]*job.RunningJob, error)
	ReportDone(jobIds []string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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