mirror of
https://github.com/rclone/rclone.git
synced 2024-12-25 08:28:57 +01:00
86e5a35491
This implements a remote control protocol activated with the --rc flag and a new command `rclone rc` to use that interface. Still to do * docs - need finishing * tests
21 lines
577 B
Go
21 lines
577 B
Go
// Package rcflags implements command line flags to set up the remote control
|
|
package rcflags
|
|
|
|
import (
|
|
"github.com/ncw/rclone/cmd/serve/httplib/httpflags"
|
|
"github.com/ncw/rclone/fs/config/flags"
|
|
"github.com/ncw/rclone/fs/rc"
|
|
"github.com/spf13/pflag"
|
|
)
|
|
|
|
// Options set by command line flags
|
|
var (
|
|
Opt = rc.DefaultOpt
|
|
)
|
|
|
|
// AddFlags adds the remote control flags to the flagSet
|
|
func AddFlags(flagSet *pflag.FlagSet) {
|
|
flags.BoolVarP(flagSet, &Opt.Enabled, "rc", "", false, "Enable the remote control server.")
|
|
httpflags.AddFlagsPrefix(flagSet, "rc-", &Opt.HTTPOptions)
|
|
}
|