Back to godoc.org

Package cas

v0.0.0-...-1557bcf
Latest Go to latest

The latest major version is .

Published: Aug 13, 2020 | License: Apache-2.0 | Module: github.com/luci/luci-go

Index

type ChunkerDeduper

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

func NewChunkerDeduper() *ChunkerDeduper

NewChunkerDeduper creates a new ChunkerDeduper object.

func (*ChunkerDeduper) Deduplicate

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

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

func (*Flags) Init

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

func (*Flags) NewClient

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

func (*Flags) Parse

func (c *Flags) Parse() error

type Uploader

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

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

NewUploader creates a new Uploader object.

func (*Uploader) Upload

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

type UploaderOption func(*Uploader)

UploaderOption is the type to configure an Uploader object.

func WithCache

func WithCache(c filemetadata.Cache) UploaderOption

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

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier