resultstore

package
v0.0.0-...-9994f1b 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: 22 Imported by: 0

Documentation

Overview

Package resultstore uploads to resultstore.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	InvocationID string
	Invocation   *rspb.Invocation
	DialOptions  []grpc.DialOption
}

Options is options for resultstore uploader.

type Properties

type Properties []*rspb.Property

Properties are invocation properties.

func (*Properties) Add

func (p *Properties) Add(key, value string)

Add adds new key/value pair.

type Uploader

type Uploader struct {
	// These are needed for upload and associate files in resultstore.
	HashFS      *hashfs.HashFS
	REAPIClient *reapi.Client
	// contains filtered or unexported fields
}

Uploader is resultstore uploader.

func New

func New(ctx context.Context, opts Options) (*Uploader, error)

New creates new resultstore uploader.

func (*Uploader) AddBuildLog

func (u *Uploader) AddBuildLog(msg string)

func (*Uploader) BuildLogData

func (u *Uploader) BuildLogData() digest.Data

func (*Uploader) Close

func (u *Uploader) Close(ctx context.Context, exitCode int) error

Close closes resultstore uploader to finish invocation with exitCode.

func (*Uploader) NewConfiguration

func (u *Uploader) NewConfiguration(ctx context.Context, id string, properties map[string]string) error

NewConfiguration uploads new configuration with properties.

func (*Uploader) SetFile

func (u *Uploader) SetFile(ctx context.Context, name string, d digest.Digest) error

SetFile set a file as the invocation's artifact.

func (*Uploader) Upload

func (u *Uploader) Upload(ctx context.Context, req *rspb.UploadRequest) error

Upload uploads req.

func (*Uploader) UploadFiles

func (u *Uploader) UploadFiles(ctx context.Context, ents []merkletree.Entry) error

UploadFiles uploads files to RBE-CAS, and sets the files as the invocation's artifact. Need to set HashFS, REAPIClient to Uploader before calling this.

Jump to

Keyboard shortcuts

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