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

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