-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Breaking up the config
and pubsub
packages by dependency
#62
Conversation
…g-breakout Conflicts: config/metrics/metrics.go pubsub/aws/aws.go pubsub/kafka/kafka.go
just a quick browse. I notice there are now multiple different logging packages found ( If you need to support these various loggers I would suggest building a logger interface which each package can take as a functional option. This way one can write a wrapper around the various logging packages to implement the interface and give that to the gizmo packages... now everybody can keep on using their preferred logging system. pssst If you want to move to a single logging package.... Go kit ;) |
Thanks for looking things over, @basvanbeek! The plan is move towards the one logger, but I couldn't think of any better, small solution at the time of the metrics PR. In the near future, I'll put together a logging PR that will clean things up a bit. This log problem you mention was here before this PR, though (it was introduced in #59). Did you have any comments on anything new introduced here? If not, I'm going to merge in the next couple hours. |
just a couple of minor items which are more in the realm of opinions :) I would for instance remove global variables (example Have explicit rather then implicit changes to behavior by functional options to constructors or explicitely set values from your config objects. |
I actually like that approach and hope we can fold in some of the changes from your fork once we have this merged into master. PRs welcome :) |
Conflicts: config/gcp.go pubsub/gcp.go
One of the largest of complaints against Gizmo so far has been how the toolkit lumps all dependencies into the
config
andpubsub
packages, often requiring users to vendor or fetch an absurd amount of packages just to work with a simple server.This PR hopes to fix this problem by breaking out the
config
andpubsub
packages into a set of subpackages, which follows a similar structure to Go Kit and it's implementations. The new package structure:Notable changes:
config.Config
is nowconfig/combined.Config
config.Server
is nowserver.Config
Config
.config.MongoDB
moved toconfig/mongodb.Config