luci: go.chromium.org/luci/client/cas Index | Files

package cas

import "go.chromium.org/luci/client/cas"

Index

Package Files

chunker_deduper.go flag.go uploader.go

type ChunkerDeduper Uses

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

ChunkerDeduper deduplicates the chunkers uploaded to CAS. Each time a CAS merkle tree is constructed, we should use this to dedupe the chunkers on the client side before uploading to the server. This is thread safe.

func NewChunkerDeduper Uses

func NewChunkerDeduper() *ChunkerDeduper

NewChunkerDeduper creates a new ChunkerDeduper object.

func (*ChunkerDeduper) Deduplicate Uses

func (cd *ChunkerDeduper) Deduplicate(chunkers []*chunker.Chunker) []*chunker.Chunker

Deduplicate removes the chunkers that have already been requested to be uploaded to CAS.

type Flags Uses

type Flags struct {
    Instance string
    // contains filtered or unexported fields
}

func (*Flags) Init Uses

func (c *Flags) Init(f *flag.FlagSet)

func (*Flags) NewClient Uses

func (c *Flags) NewClient(ctx context.Context, readOnly bool) (*client.Client, error)

func (*Flags) Parse Uses

func (c *Flags) Parse() error

type Uploader Uses

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

Uploader provides the API to upload the files in an isolate file to CAS service.

func NewUploader Uses

func NewUploader(cas *client.Client, opts ...UploaderOption) *Uploader

NewUploader creates a new Uploader object.

func (*Uploader) Upload Uses

func (up *Uploader) Upload(ctx context.Context, opts ...*isolate.ArchiveOptions) ([]digest.Digest, error)

Upload parses the isolate options and uploads the files they refer to to CAS. Returns the list of digests of the root directories. The returned digests will have the same order as |opts|.

type UploaderOption Uses

type UploaderOption func(*Uploader)

UploaderOption is the type to configure an Uploader object.

func WithCache Uses

func WithCache(c filemetadata.Cache) UploaderOption

WithCache configures the file metadata cache an uploader uses. This exists mostly for testing purpose.

Package cas imports 15 packages (graph) and is imported by 2 packages. Updated 2020-08-15. Refresh now. Tools for package owners.