Skip to content

Commit

Permalink
rename command to dbctl
Browse files Browse the repository at this point in the history
  • Loading branch information
neoaggelos committed Jun 23, 2024
1 parent d030709 commit 88bd3f6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions cmd/embeddedctl/embedded.go → cmd/dbctl/dbctl.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package embeddedctl
package dbctl

import (
"os"
Expand All @@ -11,14 +11,14 @@ var (
flagStorageDir string

Command = &cobra.Command{
Use: "embeddedctl",
Use: "dbctl",
Short: "Interact with the embedded datastore",
}
)

func init() {
// convenient default
defaultStorageDir := os.Getenv("EMBEDDED_DIR")
defaultStorageDir := os.Getenv("STORAGE_DIR")
if defaultStorageDir == "" {
snapCommon := os.Getenv("SNAP_COMMON")
if snapCommon == "" {
Expand Down
2 changes: 1 addition & 1 deletion cmd/embeddedctl/member.go → cmd/dbctl/member.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package embeddedctl
package dbctl

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion cmd/embeddedctl/snapshot.go → cmd/dbctl/snapshot.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package embeddedctl
package dbctl

import (
"context"
Expand Down
2 changes: 1 addition & 1 deletion cmd/embeddedctl/util.go → cmd/dbctl/util.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package embeddedctl
package dbctl

import (
"context"
Expand Down
4 changes: 2 additions & 2 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"os/signal"
"time"

"github.com/canonical/k8s-dqlite/cmd/embeddedctl"
"github.com/canonical/k8s-dqlite/cmd/dbctl"
"github.com/canonical/k8s-dqlite/pkg/etcd"
"github.com/canonical/k8s-dqlite/pkg/server"
"github.com/prometheus/client_golang/prometheus/promhttp"
Expand Down Expand Up @@ -154,5 +154,5 @@ func init() {
rootCmd.Flags().BoolVar(&rootCmdOpts.acpOnlyWriteQueries, "admission-control-only-for-write-queries", false, "If set, admission control will only be applied to write queries.")
rootCmd.Flags().BoolVar(&rootCmdOpts.etcdMode, "etcd-mode", false, "Run in etcd mode")

rootCmd.AddCommand(embeddedctl.Command)
rootCmd.AddCommand(dbctl.Command)
}

0 comments on commit 88bd3f6

Please sign in to comment.