{"repo":"hexdigest/gowrap","free":true,"listed":false,"github":"https://github.com/hexdigest/gowrap","clone":"git clone https://github.com/hexdigest/gowrap.git","description":"GoWrap is a command line tool for generating decorators for Go interfaces","language":"Go","stars":1334,"topics":["golang-tools","golang","go","code-generation","interface","interfaces","decorators","prometheus","prometheus-metrics","logrus"],"license":"MIT","category":"analytics","readme_excerpt":"GoWrap GoWrap is a command line tool that generates decorators for Go interface types using simple templates. With GoWrap you can easily add metrics, tracing, fallbacks, pools, and many other features into your existing code in a few seconds. Demo Installation CLI As module Usage of gowrap This will generate an implementation of the io.Reader interface wrapped with prometheus metrics This will generate a fallback decorator for the Connector interface that can be found in the ./connector subpackage: Run gowrap help for more options Hosted templates When you specify a template with the \"-t\" flag, gowrap will first search for and use the local file with this name. If the file is not found, gowrap will look for the template here and use it if found. List of available templates: - circuitbreaker stops executing methods of the wrapped interface after the specified number of consecutive errors and resumes execution after the specified delay - fallback takes several implementations of the source interface and concurrently runs each implementation if the previous attempt didn't return the result in a specified period of time, it returns the first non-error result - log instruments the source interface with logging using standard logger from the \"log\" package - logrus instruments the source interface with logging using popular sirupsen/logrus logger - opencensus instruments the source interface with opencensus spans - opentelemetry instruments the source interface with opentelemetry sp","default_branch":null,"files":null,"tree":[],"storefront":"/r/hexdigest","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/hexdigest/gowrap/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}