Skip to content

A simple wrapper for adding contextual metadata to a JSON payload

License

Notifications You must be signed in to change notification settings

talpert/go-metacontext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-metacontext

In a micro-service environment, a request to one service will often result in sub-requests being made to other services. In these sub-requests you may want to pass along some contextual metadata so that the next service does not have to look it up again.
Metacontext allows you to pass along a JSON map of metadata without changing the API contract. It is a small wrapper that simplifies the manipulation of JSON bodies to include a metadata section that can be parsed out by the receiving service.
See the example for usage.

The idea behind this is that it would be used here and there in places where something quick and dirty is all that's needed. A more full fledged solution should be considered if you are finding that this functionality is needed in a lot of places.

About

A simple wrapper for adding contextual metadata to a JSON payload

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages