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) } }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.