Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Importer ¶
type Importer struct {
// contains filtered or unexported fields
}
Importer creates database records for repositories which are missing from the database but are present on the virtual storage's primary's disk.
func (*Importer) Run ¶
Run walks the repositories on primary nodes of each virtual storage and creates database records for every repository on the primary's disk that is missing from the database. Run only performs the import for virtual storages that have not had the import successfully completed before. The returned channel must be consumed in order to release the goroutines created by Run.
type Result ¶
type Result struct { // Error is set if the import was aborted by an error. Error error // VirtualStorage indicates which virtual storage this result relates to. VirtualStorage string // RelativePaths includes the relative paths of repositories successfully imported // in a batch. RelativePaths []string }
Result is a partial result of the import. VirtualStorage is set in each Result, along with either Error or RelativePaths.