Skip to content

Commit

Permalink
clair: use "Updaters" config option
Browse files Browse the repository at this point in the history
  • Loading branch information
hdonnay committed Mar 5, 2020
1 parent 48daeae commit d9db7c1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions cmd/clair/httptransport.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,18 @@ func devMode(ctx context.Context, conf config.Config) (*http.Server, error) {
if err != nil {
return nil, fmt.Errorf("failed to initialize libindex: %v", err)
}
libV, err := libvuln.New(ctx, &libvuln.Opts{
vopt := libvuln.Opts{
MaxConnPool: int32(conf.Matcher.MaxConnPool),
ConnString: conf.Matcher.ConnString,
Migrations: conf.Matcher.Migrations,
})
}
if conf.Matcher.Updaters != nil {
vopt.Run = *conf.Matcher.Updaters
}
libV, err := libvuln.New(ctx, &vopt)
if err != nil {
return nil, fmt.Errorf("failed to initialize libvuln: %v", err)
}

mux := http.NewServeMux()
indexer, err := indexer.NewHTTPTransport(libI)
Expand Down

0 comments on commit d9db7c1

Please sign in to comment.