@@ -33,7 +33,7 @@ import (
3333
3434type Items []* Item
3535
36- func FetchInventory (ctx context.Context , logger logging.Logger , threads int , conn driver.Connection ) (Items , error ) {
36+ func FetchInventory (ctx context.Context , logger logging.Logger , threads int , conn driver.Connection , cfg * Configuration ) (Items , error ) {
3737 var out []* Item
3838 done := make (chan struct {})
3939 in := make (chan * Item )
@@ -50,7 +50,7 @@ func FetchInventory(ctx context.Context, logger logging.Logger, threads int, con
5050 }
5151 }()
5252
53- if err := executor .Run (ctx , logger , threads , runExecution (conn , in )); err != nil {
53+ if err := executor .Run (ctx , logger , threads , runExecution (conn , cfg , in )); err != nil {
5454 return nil , err
5555 }
5656
@@ -61,11 +61,11 @@ func FetchInventory(ctx context.Context, logger logging.Logger, threads int, con
6161 return out , nil
6262}
6363
64- func runExecution (conn driver.Connection , out chan <- * Item ) executor.RunFunc {
64+ func runExecution (conn driver.Connection , cfg * Configuration , out chan <- * Item ) executor.RunFunc {
6565 return func (ctx context.Context , log logging.Logger , t executor.Thread , h executor.Handler ) error {
6666 for _ , executor := range global .Items () {
6767 log .Str ("name" , executor .K ).Info ("Starting executor" )
68- q := executor .V (conn , out )
68+ q := executor .V (conn , cfg , out )
6969
7070 h .RunAsync (ctx , q )
7171 }
@@ -76,7 +76,7 @@ func runExecution(conn driver.Connection, out chan<- *Item) executor.RunFunc {
7676 }
7777}
7878
79- type Executor func (conn driver.Connection , out chan <- * Item ) executor.RunFunc
79+ type Executor func (conn driver.Connection , cfg * Configuration , out chan <- * Item ) executor.RunFunc
8080
8181func (i * Item ) Validate () error {
8282 if i == nil {
0 commit comments