ipfs-cluster/api/rest
Hector Sanjuan 4922c95589 Support --local parameter for Status[Local] and Sync[Local] operations
This allows to call the Rest API's status and sync endpoints with a
"?local=true" parameter. This will trigger operations but only on the
local peer. Cluster *Local and RPC-*Local methods have been accordingly,
although they are aliases for the PinTracker methods (but otherwise they
would not be exposed in external APIs). ipfs-cluster-ctl has been updated to
support the new flag.

The rationaly behind this feature is that sometimes, a single cluster peer
(or the ipfs daemon in it) is misbehaving. The user then wants to Sync,
Recover, or see Status for that single peer. This is specially relevant
when working with big pinsets in larger clusters, as a Status() call will
be considerably more expensive when broadcasted everywhere.

Note that the Rest API keeps returning GlobalPinInfo objects even on local=true
calls. This ensures that the user always gets the same datatype from an endpoint.

License: MIT
Signed-off-by: Hector Sanjuan <code@hector.link>
2017-12-01 12:56:26 +01:00
..
test Issue #162: Add tests for rest.Config 2017-10-19 20:49:18 +02:00
config_test.go Issue #162: Improve Config.ToJSON() tests 2017-10-20 10:42:41 +02:00
config.go Issue #162: Rework configuration format 2017-10-18 00:00:12 +02:00
restapi_test.go Support --local parameter for Status[Local] and Sync[Local] operations 2017-12-01 12:56:26 +01:00
restapi.go Support --local parameter for Status[Local] and Sync[Local] operations 2017-12-01 12:56:26 +01:00