Add support to clusterer for host errors
@@ -86,6 +86,9 @@ func (e *Executer) Execute(input string) (bool, error) {
}
}
})
+ if err != nil && e.options.HostErrorsCache != nil && e.options.HostErrorsCache.CheckError(err) {
+ e.options.HostErrorsCache.MarkFailed(input)
+ }
return results, err
}
@@ -105,5 +108,8 @@ func (e *Executer) ExecuteWithResults(input string, callback protocols.OutputEve
}
}
})
+ if err != nil && e.options.HostErrorsCache != nil && e.options.HostErrorsCache.CheckError(err) {
+ e.options.HostErrorsCache.MarkFailed(input)
+ }
return err
}
