registry

package
v0.2.0 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: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	Get(path string, rw io.Writer) error
	Post(path string, body io.Reader, rw io.Writer) error
}

A Client is used to make requests to any one of a group of registry services working together.

func NewClient

func NewClient(options Options) Client

type Options

type Options struct {
	Instances []netservice.Instance
	APIKey    string
	Timeout   time.Duration
	Log       loggy.Logger
}

type ReqMods

type ReqMods struct {
	IDs coordinates.RangeIDs `json:"ids"`
}

ReqMods is the data sent from the proxy to the registry when requesting from the registry a list of modules that the proxy is in need of downloading to its local data-store. When making the request, the proxy sends a list of ranges of serial IDs of the modules it already has contained in its data-store. That way the registry can compare that list of ranges with the set of all modules that are registered, and reply with a list of modules that only contains modules the proxy needs to download.

type ReqModsResp

type ReqModsResp struct {
	Mods []coordinates.SerialModule `json:"serials"`
}

ReqModsResp is the response sent from the registry to the proxy when the proxy requests a list of which modules it needs to download. There is no guarantee the proxy will not have already downloaded some of the modules, but given the implementation it should be pretty well optimized to not include duplicates of what is in the proxy store.

Directories

Path Synopsis
Package registrytest contains autogenerated mocks.
Package registrytest contains autogenerated mocks.

Jump to

Keyboard shortcuts

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