...

Package upload

import "cmd/vendor/golang.org/x/telemetry/internal/upload"
Overview
Index

Overview ▾

func Run

func Run(config RunConfig) error

Run generates and uploads reports, as allowed by the mode file.

type RunConfig

RunConfig configures non-default behavior of a call to Run.

All fields are optional, for testing or observability.

type RunConfig struct {
    TelemetryDir string    // if set, overrides the telemetry data directory
    UploadURL    string    // if set, overrides the telemetry upload endpoint
    LogWriter    io.Writer // if set, used for detailed logging of the upload process
    Env          []string  // if set, appended to the config download environment
    StartTime    time.Time // if set, overrides the upload start time
}