m-lab / uuid-annotator

Produces metadata locally for every connection on each server.
Apache License 2.0
0 stars 0 forks source link

Adds a local service for decorating IPs with annotations. #23

Closed pboothe closed 4 years ago

pboothe commented 4 years ago

Does not (yet) hook it up to main.


This change is Reviewable

coveralls commented 4 years ago

Pull Request Test Coverage Report for Build 160


Changes Missing Coverage Covered Lines Changed/Added Lines %
geoannotator/ipannotator.go 16 18 88.89%
<!-- Total: 124 126 98.41% -->
Totals Coverage Status
Change from base Build 152: -0.3%
Covered Lines: 681
Relevant Lines: 683

💛 - Coveralls
pboothe commented 4 years ago

annotate is the service, ip is the annotation function being called. When I imaging extending this code to annotating new things, I think I would prefer to write a different handler with different input and output handling and types to handle annotating different input datatypes. So I wanted the input datatype to be part of the base URL to allow the http.Muxer to delegate to the right handler instead of having to put that logic in there myself in the future.