Skip to content
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

Re-enable Graphite support #2829

Merged
merged 9 commits into from
Jun 9, 2015
Merged

Re-enable Graphite support #2829

merged 9 commits into from
Jun 9, 2015

Conversation

otoolep
Copy link
Contributor

@otoolep otoolep commented Jun 8, 2015

This change refactors the existing Graphite input as a Service-style component.

Originally there was support for both UDP and TCP inputs, abstracted via a factory-like pattern. This was difficult to integrate with the new Service interface, so instead the the Graphite Service type simply switches on the configured protocol when opening and closing the Service. Depending on the configured protocol, it simply opens or closes a TCP or UDP server.

This also had the nice side-effect of removing a bunch of duplicated code and attributes in the older TCP and UDP types.

@otoolep otoolep force-pushed the reenable_graphite branch 10 times, most recently from d3bdcee to 34ec70f Compare June 9, 2015 02:33
@otoolep
Copy link
Contributor Author

otoolep commented Jun 9, 2015

@toddboom
Copy link
Contributor

toddboom commented Jun 9, 2015

+1

@@ -156,6 +156,7 @@ func (s *Server) appendGraphiteService(c graphite.Config) {
return
}
srv := graphite.NewService(c)
srv.PointsWriter = s.PointsWriter
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 :)


func (s *Service) Host() string {
return s.host
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you expose this as:

func (s *Service) Addr() net.Addr

@benbjohnson
Copy link
Contributor

Overall it lgtm. Mostly minor feedback.

otoolep added a commit that referenced this pull request Jun 9, 2015
@otoolep otoolep merged commit c6c4010 into master Jun 9, 2015
@otoolep otoolep deleted the reenable_graphite branch June 9, 2015 03:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants