Unexport Holder.RecalculateCaches

This commit is contained in:
Cody Soyland 2018-07-05 21:45:26 -05:00
parent 3ff6851881
commit 0648d0fc75
3 changed files with 4 additions and 4 deletions

2
api.go
View file

@ -446,7 +446,7 @@ func (api *API) RecalculateCaches(ctx context.Context) error {
if err != nil {
return errors.Wrap(err, "broacasting message")
}
api.holder.RecalculateCaches()
api.holder.recalculateCaches()
return nil
}

View file

@ -456,11 +456,11 @@ func (h *Holder) flushCaches() {
}
}
// RecalculateCaches recalculates caches on every index in the holder. This is
// recalculateCaches recalculates caches on every index in the holder. This is
// probably not practical to call in real-world workloads, but makes writing
// integration tests much eaiser, since one doesn't have to wait 10 seconds
// after setting bits to get expected response.
func (h *Holder) RecalculateCaches() {
func (h *Holder) recalculateCaches() {
for _, index := range h.Indexes() {
index.RecalculateCaches()
}

View file

@ -513,7 +513,7 @@ func (s *Server) receiveMessage(m Message) error {
return err
}
case *RecalculateCaches:
s.holder.RecalculateCaches()
s.holder.recalculateCaches()
case *NodeEvent:
s.cluster.ReceiveEvent(obj)
case *NodeStatus: