github.com/quay/claircore@v1.5.28/rhel/ecosystem.go (about)

     1  package rhel
     2  
     3  import (
     4  	"context"
     5  
     6  	"github.com/quay/claircore/indexer"
     7  	"github.com/quay/claircore/rpm"
     8  )
     9  
    10  // NewEcosystem provides the set of scanners and coalescer for the rhel ecosystem.
    11  func NewEcosystem(_ context.Context) *indexer.Ecosystem {
    12  	return &indexer.Ecosystem{
    13  		PackageScanners: func(_ context.Context) ([]indexer.PackageScanner, error) {
    14  			return []indexer.PackageScanner{new(rpm.Scanner)}, nil
    15  		},
    16  		DistributionScanners: func(_ context.Context) ([]indexer.DistributionScanner, error) {
    17  			return []indexer.DistributionScanner{new(DistributionScanner)}, nil
    18  		},
    19  		RepositoryScanners: func(_ context.Context) ([]indexer.RepositoryScanner, error) {
    20  			return []indexer.RepositoryScanner{new(RepositoryScanner)}, nil
    21  		},
    22  		Coalescer: func(_ context.Context) (indexer.Coalescer, error) {
    23  			return new(Coalescer), nil
    24  		},
    25  	}
    26  }