Rename queuer.NewQueue -> queuer.New
This commit is contained in:
		@@ -304,7 +304,7 @@ func (k *KubernetesMesosScheduler) NewPluginConfig(terminate <-chan struct{}, mu
 | 
			
		||||
	// the store (cache) to the scheduling queue; its purpose is to maintain
 | 
			
		||||
	// an ordering (vs interleaving) of operations that's easier to reason about.
 | 
			
		||||
	kapi := &k8smScheduler{internal: k}
 | 
			
		||||
	q := queuer.NewQueuer(podUpdates)
 | 
			
		||||
	q := queuer.New(podUpdates)
 | 
			
		||||
	podDeleter := &deleter{
 | 
			
		||||
		api: kapi,
 | 
			
		||||
		qr:  q,
 | 
			
		||||
 
 | 
			
		||||
@@ -853,7 +853,7 @@ func TestDeleteOne_NonexistentPod(t *testing.T) {
 | 
			
		||||
	reg := podtask.NewInMemoryRegistry()
 | 
			
		||||
	obj.On("tasks").Return(reg)
 | 
			
		||||
 | 
			
		||||
	qr := queuer.NewQueuer(nil)
 | 
			
		||||
	qr := queuer.New(nil)
 | 
			
		||||
	assert.Equal(0, len(qr.PodQueue.List()))
 | 
			
		||||
	d := &deleter{
 | 
			
		||||
		api: obj,
 | 
			
		||||
@@ -887,7 +887,7 @@ func TestDeleteOne_PendingPod(t *testing.T) {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// preconditions
 | 
			
		||||
	qr := queuer.NewQueuer(nil)
 | 
			
		||||
	qr := queuer.New(nil)
 | 
			
		||||
	qr.PodQueue.Add(pod, queue.ReplaceExisting)
 | 
			
		||||
	assert.Equal(1, len(qr.PodQueue.List()))
 | 
			
		||||
	_, found := qr.PodQueue.Get("default/foo")
 | 
			
		||||
@@ -930,7 +930,7 @@ func TestDeleteOne_Running(t *testing.T) {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	// preconditions
 | 
			
		||||
	qr := queuer.NewQueuer(nil)
 | 
			
		||||
	qr := queuer.New(nil)
 | 
			
		||||
	qr.PodQueue.Add(pod, queue.ReplaceExisting)
 | 
			
		||||
	assert.Equal(1, len(qr.PodQueue.List()))
 | 
			
		||||
	_, found := qr.PodQueue.Get("default/foo")
 | 
			
		||||
@@ -957,7 +957,7 @@ func TestDeleteOne_badPodNaming(t *testing.T) {
 | 
			
		||||
	pod := &queuer.Pod{Pod: &api.Pod{}}
 | 
			
		||||
	d := &deleter{
 | 
			
		||||
		api: obj,
 | 
			
		||||
		qr:  queuer.NewQueuer(nil),
 | 
			
		||||
		qr:  queuer.New(nil),
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	err := d.deleteOne(pod)
 | 
			
		||||
 
 | 
			
		||||
@@ -46,7 +46,7 @@ type Queuer struct {
 | 
			
		||||
	unscheduledCond sync.Cond        // there are unscheduled pods for processing
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func NewQueuer(store queue.FIFO) *Queuer {
 | 
			
		||||
func New(store queue.FIFO) *Queuer {
 | 
			
		||||
	q := &Queuer{
 | 
			
		||||
		PodQueue:   queue.NewDelayFIFO(),
 | 
			
		||||
		podUpdates: store,
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user