cas

package
v0.0.0-...-9febfc8 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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Factory

func Factory(fakes map[string]*Instance) bscas.CasClientFactory

Factory creates a factory that returns CAS clients that use fake data to respond to requests.

The fake data is taken from the fakes argument, which is a map from instance names to the Instance containing the fake data for the instance. Missing keys will have a default Instance. A nil value indicates that the given instance does not exist.

Types

type Client

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

Client is the client that will serve fake data for a given instance

func (*Client) DownloadDirectory

func (c *Client) DownloadDirectory(ctx context.Context, d digest.Digest, execRoot string, cache filemetadata.Cache) (map[string]*client.TreeOutput, *client.MovedBytesMetadata, error)

type Instance

type Instance struct {
	// blobs maps the hashes that identify a blob to whether or not the blob
	// exists.
	//
	// Missing hashes will be treated as existing.
	Blobs map[string]bool
}

Instance provides the fake data for a RBE-CAS instance.

Jump to

Keyboard shortcuts

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