// Init registers the GoldIngester and the Android specific GoldIngester. func Init(client *http.Client, dir string) error { gitHashInfo, err := androidbuild.New(dir, client) if err != nil { return fmt.Errorf("Failed to init android build: %s", err) } // Generate the pre-ingestion hook and register the ingester. preIngestHook := getAndroidGoldPreIngestHook(gitHashInfo) ingester.Register(config.CONSTRUCTOR_ANDROID_GOLD, func() ingester.ResultIngester { return NewGoldIngester(preIngestHook) }) ingester.Register(config.CONSTRUCTOR_GOLD, func() ingester.ResultIngester { return NewGoldIngester(nil) }) return nil }
func init() { var err error st, err = storage.New(util.NewTimeoutClient()) if err != nil { panic("Can't construct HTTP client") } ingester.Register(config.CONSTRUCTOR_NANO_TRYBOT, NewTrybotResultIngester) }
// Init registers trybot ingester. The supplied database connection is where // trybot results are stored. func Init(vdb *database.VersionedDB) { ingester.Register(config.CONSTRUCTOR_GOLD_TRYBOT, func() ingester.ResultIngester { return NewTrybotResultIngester(NewTrybotResultStorage(vdb)) }) }
func init() { ingester.Register(config.CONSTRUCTOR_NANO, NewNanoBenchIngester) }