proxy.golang.org : github.com/adamluzsi/gcloud_pubsub
This package wraps the google cloud pubsub logic into two seperate part. A consumer package and a publisher package. The Package provides testing support, so all you have to do is focuse on the business values, without any fuss of emulated environment and other stuffs like that. Dependencies Install First of all, you need a Handler struct that will implement the business logic for the Gcloud pubsub subscription consuming: Now with your new fancy struct and with it's constructor function, you can begin to use the Consumer If you want to specify further options for the consumer, you can do so with option setters. When You test your application, Before the Consumer is being initialized, you should turn on Mock mod. When Mock mod enabled, not the original but a Mock consumer will be created when the New method called. It's behavior is alike, but remove the Dependency to use Google Pubsub Emulated Host, and increase the speed for your tests. Make even the Benchmarking more valuable Usage Now with your new fancy struct and with it's constructor function, you can begin to use the Consumer Publisher also support mock mod
Registry
-
Source
- Documentation
- JSON
purl: pkg:golang/github.com/adamluzsi/gcloud_pubsub
Keywords:
bdd
, cloud
, gcloud-pubsub
, golang
, google
, pubsub
, tdd
License: MIT
Latest release: 3 months ago
Namespace: github.com/adamluzsi
Stars: 2 on GitHub
Forks: 0 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 3 months ago