github.com/kyma-project/kyma/components/asset-store-controller-manager@v0.0.0-20191203152857-3792b5df17c5/internal/assethook/export_test.go (about) 1 package assethook 2 3 import ( 4 "context" 5 "io" 6 "time" 7 ) 8 9 type Callback func(ctx context.Context, basePath, filePath string, responseBody io.Reader, messagesChan chan Message, errChan chan error) 10 11 func NewProcessor(workers int, client HttpClient, continueOnFail bool, onSuccess, onFail Callback) *processor { 12 return &processor{ 13 workers: workers, 14 httpClient: client, 15 onSuccess: onSuccess, 16 onFail: onFail, 17 continueOnFail: continueOnFail, 18 timeout: time.Minute, 19 } 20 } 21 22 func NewTestValidator(processor httpProcessor) Validator { 23 return &validationEngine{ 24 processor: processor, 25 } 26 } 27 28 func NewTestMutator(processor httpProcessor) Mutator { 29 return &mutationEngine{ 30 processor: processor, 31 } 32 }