prow/cmd/artifact-uploader/main.go
func (o *Options) Run() error {
	clusterConfig, err := loadClusterConfig()
	if err != nil {
		return fmt.Errorf("failed to load cluster config: %v", err)
	}

	client, err := kubernetes.NewForConfig(clusterConfig)
	if err != nil {
		return err
	}

	prowJobClient, err := kube.NewClientInCluster(o.ProwJobNamespace)
	if err != nil {
		return err
	}

	controller := artifact_uploader.NewController(client.CoreV1(), prowJobClient, o.Options)

	stop := make(chan struct{})
	defer close(stop)
	go controller.Run(o.NumWorkers, stop)

	// Wait forever
	select {}
}
func (o *Options) Run() error {
	clusterConfig, err := loadClusterConfig()
	if err != nil {
		return fmt.Errorf("failed to load cluster config: %v", err)
	}

	client, err := kubernetes.NewForConfig(clusterConfig)
	if err != nil {
		return err
	}

	prowJobClient, err := kube.NewClientInCluster(o.ProwJobNamespace)
	if err != nil {
		return err
	}

	controller := artifact_uploader.NewController(client.CoreV1(), prowJobClient, o.Options)

	stop := make(chan struct{})
	defer close(stop)
	go controller.Run(o.NumWorkers, stop)

	// Wait forever
	select {}
}
func ( o * Options ) Run ( ) error { clusterConfig , err := loadClusterConfig ( ) if err != nil { return fmt . Errorf ( " " , err ) } client , err := kubernetes . NewForConfig ( clusterConfig ) if err != nil { return err } prowJobClient , err := kube . NewClientInCluster ( o . ProwJobNamespace ) if err != nil { return err } controller := artifact_uploader . NewController ( client . CoreV1 ( ) , prowJobClient , o . Options ) stop := make ( chan struct { } ) defer close ( stop ) go controller . Run ( o . NumWorkers , stop ) // Wait forever select { } }
// Run uploads artifacts with the specified options forever.
//
// Sends a stop message to the artifact uploader when it is interrupted.
Run uploads artifacts with the specified options forever . Sends a stop message to the artifact uploader when it is interrupted .