stock

package
v0.0.0-...-d59ed34 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: BSD-2-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LoadStockCmd = &cobra.Command{
	Use:   "load-stock",
	Short: "run stock load command as a kubernetes job in the cluster",
	Args:  cobra.NoArgs,
	RunE: func(cmd *cobra.Command, args []string) error {
		labels := cliJob.MetaLabel()
		labels["subcommand"] = "load-stock"
		for _, target := range viper.GetStringSlice("targets") {
			job, err := cliJob.Run(
				cmd,
				labels,
				LoadCommand(target),
			)
			if err != nil {
				return errors.Errorf("error in running job %s for target %s", err, target)
			}
			registry.GetLogger().Infof("deployed job %s for target %s", job.Name, target)
		}

		return nil
	},
}

Functions

func LoadCommand

func LoadCommand(target string) []string

Types

This section is empty.

Jump to

Keyboard shortcuts

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