Documentation
¶
Index ¶
Constants ¶
View Source
const COLLECTION = "hive"
View Source
const DATABASE = "mongodb://localhost:27017"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HiveDao ¶
func (*HiveDao) GetAllHivesMetrics ¶
func (h *HiveDao) GetAllHiveMetrics() { ctx, _ := context.WithTimeout(context.Background(), 10*time.Second) c := client.Database("hive").Collection("hive") var hives []bson.M cursor, err := c.Find(ctx, bson.M{}) if err!=nil { log.Fatal(err) } if err = cursor.All(ctx,&hives); err != nil { log.Fatal(err) } log.Print(hives) }
from all hives
Click to show internal directories.
Click to hide internal directories.