updater

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: 29 Imported by: 0

Documentation

Overview

Package updater computes inherited metadata and uploads it to GCS. It is is very specific to Chromium and is full of assumptions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CommonDirBQRow

func CommonDirBQRow(commit *GitCommit, md *dirmdpb.Metadata, partitionTime *timestamppb.Timestamp) *dirmdpb.DirBQRow

CommonDirBQRow returns a DirBQRow based off commit, md, and partitionTime. Note that Dir, File, and Source.SubRepo are not populated.

func GenerateDirBQRowSchema

func GenerateDirBQRowSchema() (schema bigquery.Schema, err error)

GenerateDirBQRowSchema generates a Schema based off DirBQRow.

Types

type GitCommit

type GitCommit struct {
	Host     string
	Project  string
	Ref      string
	Revision string
}

GitCommit contains the information about the git commit the directories are from.

type Updater

type Updater struct {
	// ChromiumCheckout is a path to chromium/src.git checkout.
	ChromiumCheckout string

	// GCSBucket is the destination bucket for metadata.
	GCSBucket *storage.BucketHandle

	// LegacyGSBucket is the destination bucket for metadata in legacy format.
	GCSBucketLegacy *storage.BucketHandle

	// OutDir is a path to the directory where to write output files.
	OutDir string

	// BqTable is the destination BigQuery table to export metadata rows.
	BqTable *bigquery.Table

	Commit *GitCommit

	// Flag indicating whether to export File data to BigQuery.
	BqExportFiles bool
}

Updater computed metadata from a Chromium checkout and uploads it to GCS.

func (*Updater) Run

func (u *Updater) Run(ctx context.Context) error

Run updates the metadata stored in GCS.

Jump to

Keyboard shortcuts

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