diff options
| author | Chris Lu <chris.lu@gmail.com> | 2021-11-08 00:09:11 -0800 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2021-11-08 17:47:56 -0800 |
| commit | 4729a57cc01ca360e7aa70c43b2290bb2e8bcd2d (patch) | |
| tree | 6003837cf15ab74ec1c6e809708dc146a8bc2f1a /weed/shell | |
| parent | d9dd72ea560da14ecb3cbf06cdf94b82071a9658 (diff) | |
| download | seaweedfs-4729a57cc01ca360e7aa70c43b2290bb2e8bcd2d.tar.xz seaweedfs-4729a57cc01ca360e7aa70c43b2290bb2e8bcd2d.zip | |
use constants
Diffstat (limited to 'weed/shell')
| -rw-r--r-- | weed/shell/command_cluster_ps.go | 3 | ||||
| -rw-r--r-- | weed/shell/shell_liner.go | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/weed/shell/command_cluster_ps.go b/weed/shell/command_cluster_ps.go index ff92064db..5ed1677c8 100644 --- a/weed/shell/command_cluster_ps.go +++ b/weed/shell/command_cluster_ps.go @@ -4,6 +4,7 @@ import ( "context" "flag" "fmt" + "github.com/chrislusf/seaweedfs/weed/cluster" "io" "github.com/chrislusf/seaweedfs/weed/pb/master_pb" @@ -37,7 +38,7 @@ func (c *commandClusterPs) Do(args []string, commandEnv *CommandEnv, writer io.W err = commandEnv.MasterClient.WithClient(func(client master_pb.SeaweedClient) error { resp, err := client.ListClusterNodes(context.Background(), &master_pb.ListClusterNodesRequest{ - ClientType: "filer", + ClientType: cluster.FilerType, }) fmt.Fprintf(writer, "the cluster has %d filers\n", len(resp.ClusterNodes)) diff --git a/weed/shell/shell_liner.go b/weed/shell/shell_liner.go index fed62aba1..caf8da859 100644 --- a/weed/shell/shell_liner.go +++ b/weed/shell/shell_liner.go @@ -3,6 +3,7 @@ package shell import ( "context" "fmt" + "github.com/chrislusf/seaweedfs/weed/cluster" "github.com/chrislusf/seaweedfs/weed/pb" "github.com/chrislusf/seaweedfs/weed/pb/filer_pb" "github.com/chrislusf/seaweedfs/weed/pb/master_pb" @@ -54,7 +55,7 @@ func RunShell(options ShellOptions) { var filers []pb.ServerAddress commandEnv.MasterClient.WithClient(func(client master_pb.SeaweedClient) error { resp, err := client.ListClusterNodes(context.Background(), &master_pb.ListClusterNodesRequest{ - ClientType: "filer", + ClientType: cluster.FilerType, }) if err != nil { return err |
