watch-spring/main.go

43 lines
2.1 KiB
Go
Raw Permalink Normal View History

2024-08-23 14:11:38 +02:00
//go:build linux
// +build linux
package main
import (
"fmt"
"os"
"gitea.urkob.com/mcr-swiss/watch-spring/cmd"
"github.com/spf13/cobra"
)
var rootCmd = &cobra.Command{
Use: "watch-spring",
Short: "",
Long: ``,
}
func init() {
rootCmd.AddCommand(cmd.Watch)
// cmd.Sync.PersistentFlags().String("file", "", "absolute path of the file you want to upload to backblaze")
// cmd.Sync.PersistentFlags().String("dir", "", "absolute path of the directory you want to upload to backblaze")
// cmd.Sync.PersistentFlags().String("bucket", "", "backblaze bucket name")
// cmd.Sync.PersistentFlags().Int("workers", runtime.NumCPU(), "The number of worker goroutines that are spawned to handle file processing in parallel. Each worker handles the upload of one file at a time, allowing for efficient use of system resources when dealing with a large number of files. The default value is the number of CPU cores available on the system, enabling the application to automatically scale its parallel processing capabilities based on the available hardware.")
// cmd.Sync.PersistentFlags().Int("concurrent-uploads", 4, "The number of chunk uploads that can be performed simultaneously for a single file. When a file is uploaded, it might be split into multiple chunks to enable more efficient and reliable data transfer. The concurrent-uploads flag controls how many of these chunks can be uploaded in parallel during a single file upload. This is particularly useful for large files, where parallel chunk uploads can significantly speed up the overall upload time. The default value is 4.")
// cmd.Check.PersistentFlags().String("dir", "", "Specifies the absolute path of the directory containing the backup files to be compared against the Backblaze B2 bucket. This flag is mutually exclusive with the 'file' flag.")
// cmd.Check.PersistentFlags().String("bucket", "", "Name of the Backblaze B2 bucket against which the local files or directory will be compared.")
// cmd.Cleanup.PersistentFlags().String("bucket", "", "backblaze bucket name")
}
func main() {
if err := rootCmd.Execute(); err != nil {
fmt.Println(err)
os.Exit(1)
}
}