in app/eventgen/generator/generator.go [39:52]
func newGenerator(topicID string, codec *goavro.Codec, batchSize int, numGoroutines int, maxOutstanding int) (*generator, error) {
var g generator
backoff := pubsub.NewClientBackoffConfig(config.Config.PublisherRetryInit, config.Config.PublisherRetryTotal)
client, err := pubsub.Service.NewClient(context.Background(), backoff)
if err != nil {
log.Printf("fail to connect to Cloud Pub/Sub, err: %v", err)
return nil, err
}
g.client = client
g.topic = client.NewTopic(topicID, codec, batchSize, numGoroutines, maxOutstanding)
return &g, nil
}