apps

package
v0.6.0-beta Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NamespaceCmd = &cobra.Command{
	Use:   "namespace",
	Short: "create namespace",
	Run: func(cmd *cobra.Command, args []string) {
		loader := config.NewConfigLoader()
		cfg, err := loader.GetBootstrapConfig()
		if err != nil {
			panic(err)
		}

		if cfg.Debug {
			logger.SetDebug(cfg.Debug)
		}

		meta, err := metastore.NewMetaStorage(cfg.Meta.Type, cfg.Meta)
		if err != nil {
			panic(err)
		}

		err = loader.InitCMDB(meta)
		if err != nil {
			panic(err)
		}

		if len(cfg.Storages) == 0 {
			panic("storage must config")
		}

		bio.InitPageCache(cfg.FS)
		storage.InitLocalCache(cfg)
		rule.InitQuery(meta)

		ctrl, err := controller.New(loader, meta)
		if err != nil {
			panic(err)
		}

		_, err = ctrl.CreateNamespace(context.Background(), args[0])
		if err != nil {
			panic(err)
		}
	},
}
View Source
var RootCmd = &cobra.Command{
	Use:   "nanafs",
	Short: "NanaFS engine server",
	Long:  `FS-style workflow engine for unified data management.`,
	Run: func(cmd *cobra.Command, args []string) {
		_ = cmd.Help()
	},
}

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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