...

Source file src/edge-infra.dev/cmd/sds/nfd-helper/main.go

Documentation: edge-infra.dev/cmd/sds/nfd-helper

     1  package main
     2  
     3  import (
     4  	"context"
     5  	"time"
     6  
     7  	"github.com/spf13/afero"
     8  
     9  	"edge-infra.dev/pkg/lib/fog"
    10  	"edge-infra.dev/pkg/sds/nfd/helper"
    11  )
    12  
    13  const (
    14  	sleepLengthMinutes = 1
    15  )
    16  
    17  func main() {
    18  	fs := afero.NewOsFs()
    19  	ctx := context.Background()
    20  	log := fog.New()
    21  	ctx = fog.IntoContext(ctx, log)
    22  	helper.Run(ctx, fs)
    23  
    24  	for range time.Tick(time.Minute * sleepLengthMinutes) {
    25  		helper.Run(ctx, fs)
    26  	}
    27  }
    28  

View as plain text