mirror

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExtraMetadataFilter

type ExtraMetadataFilter func(dataType string, checksum string) bool

type PackageFilter

type PackageFilter func(id string) bool

type Semaphore added in v0.0.4

type Semaphore struct {
	// contains filtered or unexported fields
}

func NewWeighted added in v0.0.4

func NewWeighted(n int64) *Semaphore

func (*Semaphore) Acquire added in v0.0.4

func (s *Semaphore) Acquire(ctx context.Context, n int64, timeout time.Duration) error

func (*Semaphore) Release added in v0.0.4

func (s *Semaphore) Release(n int64)

type Syncer

type Syncer struct {
	// contains filtered or unexported fields
}

func NewSyncer

func NewSyncer(downloadDir string, mirrorURLs []*url.URL, options ...SyncerOption) *Syncer

func (*Syncer) DownloadMetadata added in v0.0.6

func (s *Syncer) DownloadMetadata(ctx context.Context, extraMetadataFilterFn ExtraMetadataFilter) <-chan int

func (*Syncer) DownloadPackages

func (s *Syncer) DownloadPackages(ctx context.Context, packageFilterFn PackageFilter) (<-chan string, int)

func (*Syncer) Err

func (s *Syncer) Err() error

func (*Syncer) FileReader

func (s *Syncer) FileReader(ctx context.Context, path string) (io.ReadCloser, error)

func (*Syncer) RepomdData

func (s *Syncer) RepomdData(index int) *yummeta.RepoMdData

func (*Syncer) RepomdXML added in v0.0.6

func (s *Syncer) RepomdXML() io.Reader

func (*Syncer) RepomdXMLSignature added in v0.0.6

func (s *Syncer) RepomdXMLSignature() io.Reader

type SyncerOption

type SyncerOption func(*Syncer)

func WithKeyring added in v0.0.6

func WithKeyring(keyring openpgp.KeyRing) SyncerOption

func WithProxyURL

func WithProxyURL(proxy *url.URL, httpsProxy bool) SyncerOption

func WithTLSConfig

func WithTLSConfig(tlsConfig *tls.Config) SyncerOption

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL