(pindex *cbgt.PIndex, nsIndexStat map[string]interface{})
| 601 | } |
| 602 | |
| 603 | func addPIndexStats(pindex *cbgt.PIndex, nsIndexStat map[string]interface{}) error { |
| 604 | if destForwarder, ok := pindex.Dest.(*cbgt.DestForwarder); ok { |
| 605 | if bp, ok := destForwarder.DestProvider.(*BleveDest); ok { |
| 606 | bpsm, err := bp.StatsMap() |
| 607 | if err != nil { |
| 608 | return err |
| 609 | } |
| 610 | return extractStats(bpsm, nsIndexStat) |
| 611 | } |
| 612 | } |
| 613 | return nil |
| 614 | } |
| 615 | |
| 616 | func updateStat(name string, val float64, nsIndexStat map[string]interface{}) { |
| 617 | oldValue, ok := nsIndexStat[name] |