mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-11-27 12:49:41 +08:00
refactor
This commit is contained in:
parent
701abbb9df
commit
9cd263b2ce
14
weed/shell/command.go
Normal file
14
weed/shell/command.go
Normal file
@ -0,0 +1,14 @@
|
||||
package shell
|
||||
|
||||
import "io"
|
||||
|
||||
type command interface {
|
||||
Name() string
|
||||
Help() string
|
||||
Do([]string, *CommandEnv, io.Writer) error
|
||||
IsResourceHeavy() bool
|
||||
}
|
||||
|
||||
var (
|
||||
Commands = []command{}
|
||||
)
|
@ -6,7 +6,6 @@ import (
|
||||
"github.com/seaweedfs/seaweedfs/weed/operation"
|
||||
"github.com/seaweedfs/seaweedfs/weed/pb/volume_server_pb"
|
||||
"github.com/seaweedfs/seaweedfs/weed/storage/needle_map"
|
||||
"io"
|
||||
"net/url"
|
||||
"strconv"
|
||||
"strings"
|
||||
@ -38,17 +37,6 @@ type CommandEnv struct {
|
||||
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 {
|
||||
ce := &CommandEnv{
|
||||
env: make(map[string]string),
|
||||
|
Loading…
Reference in New Issue
Block a user