コード例 #1
0
ファイル: statcap.go プロジェクト: dustin/statcap
func store(db statstore.Storer, ts time.Time, m map[string]interface{}) error {
	_, _, err := db.Insert(statstore.NewItem(m, ts))
	if err != nil {
		log.Printf("Error inserting data:  %v", err)
	}
	return err
}
コード例 #2
0
ファイル: convert.go プロジェクト: dustin/statcap
func storer(w statstore.Storer, ch <-chan statstore.StoredItem) {
	defer wg.Done()

	for e := range ch {
		w.Insert(e)
	}
}