gs

package
v0.0.0-...-e560ebb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Overview

Package gs exports helpers to upload log data to Google Storage.

Index

Constants

View Source
const ImageArchivePrefix = "gs://chromeos-image-archive"

ImageArchivePrefix is the base URL for the Google Storage bucket for ChromeOS image archives.

Variables

This section is empty.

Functions

This section is empty.

Types

type DirWriter

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

DirWriter exposes methods to write a local directory to Google Storage.

func NewDirWriter

func NewDirWriter(client gsClient, maxConcurrentUploads int) *DirWriter

NewDirWriter creates an object which can write a directory and its subdirectories to the given Google Storage path

func (*DirWriter) WriteDir

func (w *DirWriter) WriteDir(ctx context.Context, srcDir string, dstDir gcgs.Path) error

WriteDir writes a local directory to Google Storage.

If ctx is canceled, WriteDir() returns after completing in-flight uploads, skipping remaining contents of the directory and returns ctx.Err().

Jump to

Keyboard shortcuts

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