bg

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2019 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	// Frequency determines how often the worker will check in
	// with the registry, looking for new modules that need to be
	// downloaded by this instance of the proxy. A typical value
	// would be something like 30 seconds - not too slow, but also
	// not spamming the network with polling traffic.
	Frequency time.Duration
}

type Worker

type Worker interface {
	Start(options Options)
}

A Worker runs in the background, polling the registry for new modules that need to be downloaded, and downloading those modules as needed.

func New

func New(
	emitter stats.Sender,
	dlTracker problems.Tracker,
	index store.Index,
	store store.ZipStore,
	registryRequester get.RegistryAPI,
	downloader get.Downloader,
) Worker

Jump to

Keyboard shortcuts

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