You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
451 B

  1. package shell
  2. import (
  3. "github.com/chrislusf/seaweedfs/weed/wdclient"
  4. "google.golang.org/grpc"
  5. "io"
  6. )
  7. type ShellOptions struct {
  8. Masters *string
  9. GrpcDialOption grpc.DialOption
  10. }
  11. type commandEnv struct {
  12. env map[string]string
  13. masterClient *wdclient.MasterClient
  14. option ShellOptions
  15. }
  16. type command interface {
  17. Name() string
  18. Help() string
  19. Do([]string, *commandEnv, io.Writer) error
  20. }
  21. var (
  22. commands = []command{}
  23. )