Documentation ¶
Overview ¶
Package tool provides implementation of the debugging related operations supported by go/cmd/remotetool package.
Index ¶
- type Client
- func (c *Client) CheckDeterminism(ctx context.Context, actionDigest, actionRoot string, attempts int) error
- func (c *Client) DownloadAction(ctx context.Context, actionDigest, outputPath string, overwrite bool) error
- func (c *Client) DownloadActionResult(ctx context.Context, actionDigest, pathPrefix string) error
- func (c *Client) DownloadBlob(ctx context.Context, blobDigest, path string) (string, error)
- func (c *Client) DownloadDirectory(ctx context.Context, rootDigest, path string) error
- func (c *Client) ExecuteAction(ctx context.Context, actionDigest, actionRoot, outDir string, oe outerr.OutErr) (*command.Metadata, error)
- func (c *Client) ShowAction(ctx context.Context, actionDigest string) (string, error)
- func (c *Client) UploadBlob(ctx context.Context, path string) error
- func (c *Client) UploadBlobV2(ctx context.Context, path string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client is a remote execution client.
func (*Client) CheckDeterminism ¶
func (c *Client) CheckDeterminism(ctx context.Context, actionDigest, actionRoot string, attempts int) error
CheckDeterminism executes the action the given number of times and compares output digests, reporting failure if a mismatch is detected.
func (*Client) DownloadAction ¶
func (c *Client) DownloadAction(ctx context.Context, actionDigest, outputPath string, overwrite bool) error
DownloadAction parses and downloads an action to the given directory. The output directory will have the following:
- ac.textproto: the action proto file in text format.
- cmd.textproto: the command proto file in text format.
- input/: the input tree root directory with all files under it.
- input_node_properties.txtproto: all the NodeProperties defined on the input tree, as an InputSpec proto file in text format. Will be omitted if no NodeProperties are defined.
func (*Client) DownloadActionResult ¶
DownloadActionResult downloads the action result of the given action digest if it exists in the remote cache.
func (*Client) DownloadBlob ¶
DownloadBlob downloads a blob from the remote cache into the specified path. If the path is empty, it writes the contents to stdout instead.
func (*Client) DownloadDirectory ¶
DownloadDirectory downloads a an input root from the remote cache into the specified path.
func (*Client) ExecuteAction ¶
func (c *Client) ExecuteAction(ctx context.Context, actionDigest, actionRoot, outDir string, oe outerr.OutErr) (*command.Metadata, error)
ExecuteAction executes an action in a canonical structure remotely. The structure is the same as that produced by DownloadAction. top level >
> ac.textproto (Action text proto) > cmd.textproto (Command text proto) > input_node_properties.textproto (InputSpec text proto, optional) > input (Input root) > inputs...
func (*Client) ShowAction ¶
ShowAction parses and displays an action with its corresponding command.
func (*Client) UploadBlob ¶
UploadBlob uploads a blob from the specified path into the remote cache.