There will be some time that we want to know the current best brick of a chain for system administration purpose. To achieve this from Erlang code, the code has to call brick_chainmon:calculate_best_first_brick(#state{}). However this function is not exported and also requires knowledge of Chain Monitor's internal #state record.
Instead of simply exposing that function, create another function, which doesn't require the knowledge of internal #state record.
brick_chainmon:calculate_best_brick(chain_name())
Once this function is added, we could add an hibair-admin command to get the best brick.
This item is related to https://github.com/hibari/hibari-doc/issues/13
There will be some time that we want to know the current best brick of a chain for system administration purpose. To achieve this from Erlang code, the code has to call
brick_chainmon:calculate_best_first_brick(#state{})
. However this function is not exported and also requires knowledge of Chain Monitor's internal#state
record.Instead of simply exposing that function, create another function, which doesn't require the knowledge of internal
#state
record.brick_chainmon:calculate_best_brick(chain_name())
Once this function is added, we could add an hibair-admin command to get the best brick.