gs

package
v0.0.0-...-9febfc8 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: 14 Imported by: 0

Documentation

Overview

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

Index

Constants

This section is empty.

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, retryLimit 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 gs.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