add shell command to list all collections

This commit is contained in:
Chris Lu
2019-03-16 13:43:16 -07:00
parent b92122b885
commit 657dd2e6c9
11 changed files with 589 additions and 114 deletions

27
weed/shell/commands.go Normal file
View File

@@ -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{}
)