Home

Awesome

Mortar

Go codecov PkgGoDev Go Report Card

<table> <tr> <th><p align="left"><img src=wiki/logo.svg align="center" height=256></p></th> <th> <p align="left">Mortar is a GO framework/library for building gRPC (and REST) web services. Mortar has out-of-the-box support for configuration, application metrics, logging, tracing, profiling, dependency injection and more. While it comes with predefined defaults, Mortar gives you total control to fully customize it. </p> </th> </tr> </table>

Demo

Clone this demo repository to better understand some of Mortar capabilities.

When you done, read the documentation.

Service Template

To help you bootstrap your services with Mortar here you can find a template. Read its README first.

Features

...and more.

Telemetry (Everything connected)

Support for *http.Client Interceptors, so you can

Monitoring/Metrics support

Export to either Prometheus/Datadog/statsd/etc, it's your choice. Mortar only provides the Interface and also caches the metrics so you don't have to.

counter := w.deps.Metrics.WithTags(monitor.Tags{
 "color":   request.GetDesiredColor(),
 "success": fmt.Sprintf("%t", err == nil),
}).Counter("paint_desired_color", "New paint color for car")

counter.Inc()

counter is actually a singleton, uniqueness calculated here

grafana

For more information about Mortar Monitoring read here.

Additional Features

There are some features not listed here, please check the Documentation for more.

Documentation

Mortar is not a drop-in replacement.

It's important to read its Documentation first.