pkgsite: golang.org/x/pkgsite/internal/index Index | Files

package index

import "golang.org/x/pkgsite/internal/index"

Index

Package Files

index.go test_helper.go

type Client Uses

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

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

func New Uses

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 Uses

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 Uses

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

GetVersions queries the index for new versions.

Package index imports 14 packages (graph) and is imported by 3 packages. Updated 2020-08-05. Refresh now. Tools for package owners.