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