Documentation
¶
Overview ¶
Package sagafetch fetches Saga fragments held in other repositories.
It exists because pkg/saga cannot: fetching means git, git lives in internal/, and pkg/ does not import internal/. So pkg/saga declares the seam (saga.Fetcher) and this supplies something that can fill it — the same arrangement as sbom.Generator.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fetcher ¶
type Fetcher struct {
// contains filtered or unexported fields
}
Fetcher materialises remote fragment references, reusing one checkout per repository and revision within a run.
Sharing matters more here than it looks. A monorepo's descriptor may name several fragments from one platform repository, and each is a `path:` into the same tree — cloning once and expanding every pattern against it is the difference between one clone and five.
func (*Fetcher) Fetch ¶
Fetch returns a directory holding url at revision, and the commit it resolved to.
Offline is refused rather than skipped. A fragment that cannot be fetched is scope the descriptor claims and the run would not have — and a scan that quietly covers less than its descriptor says is the failure this tool exists to prevent, so it is worth failing the run.