ethernethook

package
v0.0.0-...-89147f6 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2025 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewExtendedGSClient

func NewExtendedGSClient(client *storage.Client) (*extendedGSClient, error)

NewExtendedGSClient takes a Google Storage client and returns a wrapped version.

A wrapped Google Storage client, much like the raw client it wraps, is intended to be a long-lived object. For that reason, we return an error value as well to make error handling more obvious at the call site.

func NewRegexDownloader

func NewRegexDownloader(bucket string, query *storage.Query, inputPatterns patternMap) (*regexDownloader, error)

NewRegexDownloader creates an object that manages the common pattern of downloading files matching certain regexes and a query. For example, grabbing both `dmesg.gz` and `status.log` out.

func NewSingleTaskDownloader

func NewSingleTaskDownloader(bucket string, prefix string) (*singleTaskDownloader, error)

NewSingleTaskDownloader creates an object that manages downloads corresponding to a single swarming task.

Types

type Entry

type Entry struct {
	// Name is a human-readable short name for the type of entity, like "results".
	Name string
	// GSURL is the google storage location of the item.
	GSURL string
	// Content is the actual data. It is not the *raw* content. We will, for example,
	// decompress the data if it is compressed.
	Content string
}

Entry is a pair consisting of a GSURL and the contents of the file in Google Storage.

type IteratorStatus

type IteratorStatus int32

IteratorStatus is an enum that makes it easy to distinguish between iterators that hit the end of their iteration successfully and genuine errors.

type LsResult

type LsResult func(state *LsState) bool

LsResult is an iterator over objects.

type LsState

type LsState struct {
	Attrs *storage.ObjectAttrs
	Err   error
}

LsState stores the current iteration state as we're traversing the results of Ls.

func (*LsState) Reset

func (s *LsState) Reset()

Reset resets the values of all the fields to zero.

Jump to

Keyboard shortcuts

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