pull

package
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2025 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUpToDate = errors.New("repository is already up to date")

ErrUpToDate is returned when a repository index is already up to date and doesn't require a pull.

Functions

func Pull

func Pull(opts Options, s *store.Store, importer index.Importer) error

Pull synchronizes a repository index from a remote repository and atomically updates the store. If the index is already up to date, it returns ErrUpToDate. If opts.ProgressFunc is set, Pull will call it continuously with the current progress of the pull operation. The original store remains usable and unmodified until the pull operation completes successfully. It will only be blocked for the duration of the atomic replacement operation.

Types

type Options

type Options struct {
	BaseURL      string
	Version      string
	Repo         string
	Architecture string
	ProgressFunc func(title string, received, total int64)
}

Options represents settings for pull operations

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳