1
0
mirror of https://github.com/rancher/norman.git synced 2025-09-02 15:54:32 +00:00

Subcontext and mapping updates

This commit is contained in:
Darren Shepherd
2017-11-21 13:46:30 -07:00
parent 3ba704aef1
commit 38c9c5c6c3
78 changed files with 1694 additions and 996 deletions

View File

@@ -69,12 +69,12 @@ func (g *genericController) AddHandler(handler HandlerFunc) {
g.handlers = append(g.handlers, handler)
}
func (g *genericController) Start(threadiness int, ctx context.Context) error {
func (g *genericController) Start(ctx context.Context, threadiness int) error {
g.Lock()
defer g.Unlock()
if !g.running {
go g.run(threadiness, ctx)
go g.run(ctx, threadiness)
}
g.running = true
@@ -88,7 +88,7 @@ func (g *genericController) queueObject(obj interface{}) {
}
}
func (g *genericController) run(threadiness int, ctx context.Context) {
func (g *genericController) run(ctx context.Context, threadiness int) {
defer utilruntime.HandleCrash()
defer g.queue.ShutDown()