cipd

package
Version: v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UseCipdClientFactory

func UseCipdClientFactory(ctx context.Context, factory CipdClientFactory) context.Context

UseCipdClientFactory returns a context that causes new Client instances to use the given factory when getting the CIPD client.

Types

type CipdClient

type CipdClient interface {
	ResolveVersion(ctx context.Context, packageName, version string) (common.Pin, error)
	EnsurePackages(ctx context.Context, packages common.PinSliceBySubdir, paranoia cipd.ParanoidMode, dryRun bool) (cipd.ActionMap, error)
}

CipdClient provides a subset of the cipd.Client interface

type CipdClientFactory

type CipdClientFactory func(ctx context.Context, cipdRoot string) (CipdClient, error)

CipdClientFactory creates the client for accessing CIPD that will deploy packages to the directory identified by cipdRoot.

type Client

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

Client provides the recipe-related operations required for bootstrapping.

func NewClient

func NewClient(ctx context.Context, cipdRoot string) (*Client, error)

NewClient returns a new recipe client.

If ctx is a context returned from UseCipdClientFactory, then the returned client will use the factory that was passed to UseCipdClientFactory to get a CIPD client. Otherwise, a client created using cipd.NewClient with default options will be used.

func (*Client) DownloadPackage

func (c *Client) DownloadPackage(ctx context.Context, name, version string) (string, error)

DownloadPackage downloads and installs the CIPD package with the given name at the given version and returns the path to the deployed package.

Source Files

Jump to

Keyboard shortcuts

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