|
@ -6,7 +6,6 @@ import ( |
|
|
"github.com/seaweedfs/seaweedfs/weed/operation" |
|
|
"github.com/seaweedfs/seaweedfs/weed/operation" |
|
|
"github.com/seaweedfs/seaweedfs/weed/pb/volume_server_pb" |
|
|
"github.com/seaweedfs/seaweedfs/weed/pb/volume_server_pb" |
|
|
"github.com/seaweedfs/seaweedfs/weed/storage/needle_map" |
|
|
"github.com/seaweedfs/seaweedfs/weed/storage/needle_map" |
|
|
"io" |
|
|
|
|
|
"net/url" |
|
|
"net/url" |
|
|
"strconv" |
|
|
"strconv" |
|
|
"strings" |
|
|
"strings" |
|
@ -38,17 +37,6 @@ type CommandEnv struct { |
|
|
locker *exclusive_locks.ExclusiveLocker |
|
|
locker *exclusive_locks.ExclusiveLocker |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
type command interface { |
|
|
|
|
|
Name() string |
|
|
|
|
|
Help() string |
|
|
|
|
|
Do([]string, *CommandEnv, io.Writer) error |
|
|
|
|
|
IsResourceHeavy() bool |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var ( |
|
|
|
|
|
Commands = []command{} |
|
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
func NewCommandEnv(options *ShellOptions) *CommandEnv { |
|
|
func NewCommandEnv(options *ShellOptions) *CommandEnv { |
|
|
ce := &CommandEnv{ |
|
|
ce := &CommandEnv{ |
|
|
env: make(map[string]string), |
|
|
env: make(map[string]string), |
|
|