pool

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JobNode

type JobNode struct {
	*v1.IntegrationJob
}

JobNode is a node to be stored in jobMap and JobPool

func (*JobNode) DeepCopy

func (f *JobNode) DeepCopy() structs.Item

func (*JobNode) Equals

func (f *JobNode) Equals(another structs.Item) bool

type JobPool

type JobPool struct {
	Pending *structs.SortedUniqueList
	Running *structs.SortedUniqueList
	// contains filtered or unexported fields
}

JobPool stores current status of v1.IntegrationJobs, who are in Pending status or Running status All operations for this pool should be done in thread-safe manner, using Lock and Unlock methods

func NewJobPool

func NewJobPool(ch chan struct{}, compareFunc structs.CompareFunc) *JobPool

func (*JobPool) Lock

func (j *JobPool) Lock()

func (*JobPool) SyncJob

func (j *JobPool) SyncJob(job *v1.IntegrationJob)

func (*JobPool) Unlock

func (j *JobPool) Unlock()

Jump to

Keyboard shortcuts

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