cas

package
v0.0.0-...-6e5b399 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2025 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UseCasClientFactory

func UseCasClientFactory(ctx context.Context, factory CasClientFactory) context.Context

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

Types

type CasClient

type CasClient interface {
	DownloadDirectory(ctx context.Context, d digest.Digest, outDir string, cache filemetadata.Cache) (map[string]*client.TreeOutput, *client.MovedBytesMetadata, error)
}

CasClient provides a subset of the client.Client interface.

type CasClientFactory

type CasClientFactory func(ctx context.Context, instance string) (CasClient, error)

CasClientFactory creates the client for downloading blobs from CAS.

type Client

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

Client provides the CAS-related operations required for bootstrapping.

func NewClient

func NewClient(ctx context.Context) *Client

func (*Client) Download

func (c *Client) Download(ctx context.Context, outDir, instance string, d *apipb.Digest) error

Download downloads a CAS blob with the given digest from the given CAS instance.

Jump to

Keyboard shortcuts

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