You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the set command the registered callback will be called on local or remote nodes automatically depending upon the --node and --all flags. Right now however, command callbacks must do the cross node calls themselves instead of being told where to run. Make this more inline with set and call the functions in the right locations automatically.
The text was updated successfully, but these errors were encountered:
After thinking about this more I think it's overkill, (at least for now). Most commands are status which show summary information and require contacting multiple nodes. Sometimes there is interest for info on a given node, but this still may require using cluster metadata or rpc-ing all nodes as is currently done in riak-admin handoff status. In this case running a callback function only on the given node is actually the wrong thing to do. Therefore we must maintain 2 ways to register commands which seems to unnecessarily complicate thing.
As some commands will want to contact a given node or all nodes, the functions are exported already from riak_cli_nodes to find all nodes and contact a given node via rpc.
As another 'intermediate' step I created a PR that includes a riak_cli_typecast module that will build up a library of usable functions that can be used to simplify command registration.
When using the
set
command the registered callback will be called on local or remote nodes automatically depending upon the --node and --all flags. Right now however, command callbacks must do the cross node calls themselves instead of being told where to run. Make this more inline withset
and call the functions in the right locations automatically.The text was updated successfully, but these errors were encountered: