index

package
v0.0.0-...-86cb477 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Overview

Package index provides a client for communicating with the module index.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

A Client is used by the worker service to communicate with the module index.

func New

func New(rawurl string) (_ *Client, err error)

New constructs a *Client using the provided rawurl, which is expected to be an absolute URI that can be directly passed to http.Get.

func SetupTestIndex

func SetupTestIndex(t *testing.T, versions []*internal.IndexVersion) (*Client, func())

SetupTestIndex creates a module index for testing using the given version map for data. It returns a function for tearing down the index server after the test is completed, and a Client for interacting with the test index.

func (*Client) GetVersions

func (c *Client) GetVersions(ctx context.Context, since time.Time, limit int) (_ []*internal.IndexVersion, err error)

GetVersions queries the index for new versions.

Jump to

Keyboard shortcuts

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