initupload

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 3, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Overview

Package initupload determines the output status of clone operations and posts that status along with artifacts and logs to cloud storage.

Index

Constants

View Source
const (
	// JSONConfigEnvVar is the environment variable where utilities expect to find a full JSON
	// configuration.
	JSONConfigEnvVar = "INITUPLOAD_OPTIONS"
)

Variables

This section is empty.

Functions

func Encode

func Encode(options Options) (string, error)

Encode will encode the set of options in the format that is expected for the configuration environment variable.

Types

type Options

type Options struct {
	*gcsupload.Options

	// Log is the log file to which clone records are written. If unspecified, no clone records
	// are uploaded.
	Log string `json:"log,omitempty"`
}

Options holds the GCS options and the log file of clone records.

func NewOptions

func NewOptions() *Options

NewOptions returns an empty Options with no nil fields.

func (*Options) AddFlags

func (o *Options) AddFlags(flags *flag.FlagSet)

AddFlags binds flags to options.

func (*Options) Complete

func (o *Options) Complete(args []string)

Complete internalizes command line arguments.

func (*Options) ConfigVar

func (o *Options) ConfigVar() string

ConfigVar exposes the environment variable used to store serialized configuration.

func (*Options) LoadConfig

func (o *Options) LoadConfig(config string) error

LoadConfig loads options from serialized config.

func (Options) Run

func (o Options) Run() error

Run will start the initupload job to upload the artifacts, logs and clone status.

Jump to

Keyboard shortcuts

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