mirror of
https://github.com/ipfs/kubo.git
synced 2025-10-18 04:03:01 +08:00
implement support for --api option
This commit adds support for the --api option, which allows users to specify an API endpoint to run the cli command against. It enables much easier control of remote daemons. It also - ensures the API server version matches the API client - implements support for the $IPFS_PATH/api file Still TODO: - tests! - multiaddr to support /dns/ License: MIT Signed-off-by: Juan Batiz-Benet <juan@benet.ai>
This commit is contained in:
@ -16,6 +16,10 @@ type TestOutput struct {
|
||||
Bar int
|
||||
}
|
||||
|
||||
const (
|
||||
ApiOption = "api"
|
||||
)
|
||||
|
||||
var Root = &cmds.Command{
|
||||
Helptext: cmds.HelpText{
|
||||
Tagline: "global p2p merkle-dag filesystem",
|
||||
@ -73,6 +77,7 @@ Use 'ipfs <command> --help' to learn more about each command.
|
||||
cmds.BoolOption("help", "Show the full command help text"),
|
||||
cmds.BoolOption("h", "Show a short version of the command help text"),
|
||||
cmds.BoolOption("local", "L", "Run the command locally, instead of using the daemon"),
|
||||
cmds.StringOption(ApiOption, "Overrides the routing option (dht, supernode)"),
|
||||
},
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user