mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-19 21:39:55 +08:00
add shell command to list all collections
This commit is contained in:
27
weed/shell/commands.go
Normal file
27
weed/shell/commands.go
Normal 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{}
|
||||
)
|
Reference in New Issue
Block a user