From 657dd2e6c93c02f46b10dfd43fb6e9b38c025ece Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sat, 16 Mar 2019 13:43:16 -0700 Subject: add shell command to list all collections --- weed/shell/commands.go | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 weed/shell/commands.go (limited to 'weed/shell/commands.go') diff --git a/weed/shell/commands.go b/weed/shell/commands.go new file mode 100644 index 000000000..4df70ff55 --- /dev/null +++ b/weed/shell/commands.go @@ -0,0 +1,27 @@ +package shell + +import ( + "github.com/chrislusf/seaweedfs/weed/wdclient" + "google.golang.org/grpc" + "io" +) + +type ShellOptions struct { + Masters *string + GrpcDialOption grpc.DialOption +} + +type commandEnv struct { + env map[string]string + masterClient *wdclient.MasterClient +} + +type command interface { + Name() string + Help() string + Do([]string, *commandEnv, io.Writer) error +} + +var ( + commands = []command{} +) -- cgit v1.2.3