MCPcopy Create free account
hub / github.com/NVIDIA/gpu-operator / start

Function start

cmd/nvidia-validator/main.go:511–530  ·  view source on GitHub ↗
(ctx context.Context, cli *cli.Command)

Source from the content-addressed store, hash-verified

509}
510
511func start(ctx context.Context, cli *cli.Command) error {
512 // if cleanup is requested, delete all existing status files(default)
513 if cleanupAllFlag {
514 // cleanup output directory and create again each time
515 err := os.RemoveAll(outputDirFlag)
516 if err != nil {
517 if !os.IsNotExist(err) {
518 return err
519 }
520 }
521 }
522
523 // create status directory
524 err := os.Mkdir(outputDirFlag, 0755)
525 if err != nil && !os.IsExist(err) {
526 return err
527 }
528
529 return validateComponent(ctx, componentFlag)
530}
531
532func validateComponent(ctx context.Context, componentFlag string) error {
533 switch componentFlag {

Callers

nothing calls this directly

Calls 1

validateComponentFunction · 0.85

Tested by

no test coverage detected