💨A well crafted go packages that help you build robust, reliable, maintainable microservices.

Hippo Logo

Hippo

A Microservices Toolkit.

Hippo is a collection of well crafted go packages that help you build robust, reliable, maintainable microservices. It is not a full-fledged framework with lot of magic, predefined architecture, specific patterns and bullshit opinions so you will be the one behind the wheel.

It provides libraries to implement components for service discovery, async jobs, authentication, authorization, logging, caching, metrics, tracing, rate-limiting...etc which are essential requirements for running microservices in production.

Documentation

Installation:

go get -u github.com/clivern/hippo
import (
    "github.com/clivern/hippo"
)

Components:

HTTP Requests Component

httpClient := hippo.NewHTTPClient()

// Get Request
response, err := httpClient.Get(
    "https://httpbin.org/get",
    map[string]string{"url_arg_key": "url_arg_value"},
    map[string]string{"header_key": "header_value"},
)

// Delete Request
response, err := httpClient.Delete(
    "https://httpbin.org/delete",
    map[string]string{"url_arg_key": "url_arg_value"},
    map[string]string{"header_key": "header_value"},
)

// Post Request
response, err := httpClient.Post(
    "https://httpbin.org/post",
    `{"RequestBodyKey":"RequestBodyValue"}`,
    map[string]string{"url_arg_key": "url_arg_value"},
    map[string]string{"header_key": "header_value"},
)

// Put Request
response, err := httpClient.Put(
    "https://httpbin.org/put",
    `{"RequestBodyKey":"RequestBodyValue"}`,
    map[string]string{"url_arg_key": "url_arg_value"},
    map[string]string{"header_key": "header_value"},
)

// ....

statusCode := httpClient.GetStatusCode(response)
responseBody, err := httpClient.ToString(response)

Cache/Redis Component

driver := hippo.NewRedisDriver("localhost:6379", "password", 0)

// connect to redis server
ok, err := driver.Connect()
// ping check
ok, err = driver.Ping()

// set an item
ok, err = driver.Set("app_name", "Hippo", 0)
// check if exists
ok, err = driver.Exists("app_name")
// get value
value, err := driver.Get("app_name")
// delete an item
count, err := driver.Del("app_name")

// hash set
ok, err = driver.HSet("configs", "app_name", "Hippo")
// check if item on a hash
ok, err = driver.HExists("configs", "app_name")
// get item from a hash
value, err = driver.HGet("configs", "app_name")
// hash length
count, err = driver.HLen("configs")
// delete item from a hash
count, err = driver.HDel("configs", "app_name")
// clear the hash
count, err = driver.HTruncate("configs")

// Pub/Sub
driver.Publish("hippo", "Hello")
driver.Subscribe("hippo", func(message hippo.Message) error {
    // message.Channel
    // message.Payload
    return nil
})

Time Series/Graphite Component

import "time"


metric := hippo.NewMetric("hippo1.up", "23", time.Now().Unix()) // Type is hippo.Metric

metrics := hippo.NewMetrics("hippo2.up", "35", time.Now().Unix()) // type is []hippo.Metric
metrics = append(metrics, hippo.NewMetric("hippo2.down", "40", time.Now().Unix()))
metrics = append(metrics, hippo.NewMetric("hippo2.error", "70", time.Now().Unix()))

// NewGraphite(protocol string, host string, port int, prefix string)
// protocol can be tcp, udp or nop
// prefix is a metric prefix
graphite := hippo.NewGraphite("tcp", "127.0.0.1", 2003, "")
error := graphite.Connect()

if error == nil{
    // send one by one
    graphite.SendMetric(metric)

    // bulk send
    graphite.SendMetrics(metrics)
}

System Stats Component

// func NewSystemStats(enableCPU, enableMem, enableGC bool) *SystemStats {
stats := hippo.NewSystemStats(true, true, true)
stats.GetStats() // type map[string]uint64
// map[cpu.cgo_calls:0 cpu.goroutines:1 mem.alloc:0....]

Correlation ID Component

correlation := hippo.NewCorrelation()
correlation.UUIDv4()

Workers Pool Component

import "fmt"

tasks := []*hippo.Task{
    hippo.NewTask(func() (string, error) {
        fmt.Println("Task #1")
        return "Result 1", nil
    }),
    hippo.NewTask(func() (string, error) {
        fmt.Println("Task #2")
        return "Result 2", nil
    }),
    hippo.NewTask(func() (string, error) {
        fmt.Println("Task #3")
        return "Result 3", nil
    }),
}

// hippo.NewWorkersPool(tasks []*Task, concurrency int) *WorkersPool
p := hippo.NewWorkersPool(tasks, 2)
p.Run()

var numErrors int
for _, task := range p.Tasks {
    if task.Err != nil {
        fmt.Println(task.Err)
        numErrors++
    } else {
        fmt.Println(task.Result)
    }
    if numErrors >= 10 {
        fmt.Println("Too many errors.")
        break
    }
}

Health Checker Component

import "fmt"

healthChecker := hippo.NewHealthChecker()
healthChecker.AddCheck("ping_check", func() (bool, error){
    return true, nil
})
healthChecker.AddCheck("db_check", func() (bool, error){
    return false, fmt.Errorf("Database Down")
})
healthChecker.RunChecks()

fmt.Println(healthChecker.ChecksStatus())
// Output -> DOWN
fmt.Println(healthChecker.ChecksReport())
// Output -> [{"id":"ping_check","status":"UP","error":"","result":true},{"id":"db_check","status":"DOWN","error":"Database Down","result":false}] <nil>
import "fmt"

healthChecker := hippo.NewHealthChecker()

healthChecker.AddCheck("url_check", func() (bool, error){
    return hippo.HTTPCheck("httpbin_service", "https://httpbin.org/status/503", map[string]string{}, map[string]string{})
})
healthChecker.AddCheck("redis_check", func() (bool, error){
    return hippo.RedisCheck("redis_service", "localhost:6379", "", 0)
})
healthChecker.RunChecks()

fmt.Println(healthChecker.ChecksStatus())
// Outputs -> DOWN
fmt.Println(healthChecker.ChecksReport())
// Outputs -> [{"id":"url_check","status":"DOWN","error":"Service httpbin_service is unavailable","result":false},{"id":"redis_check","status":"DOWN","error":"Error while connecting redis_service: dial tcp [::1]:6379: connect: connection refused","result":false}] <nil>

API Rate Limiting

import "time"

// Create a limiter with a specific identifier(IP address or access token or username....etc)
// NewCallerLimiter(identifier string, eventsRate rate.Limit, tokenBurst int) *rate.Limiter
limiter := hippo.NewCallerLimiter("10.10.10.10", 100, 1)
if limiter.Allow() == false {
    // Don't allow access
} else {
    // Allow Access
}


// auto clean old clients (should run as background process)
// CleanupCallers(cleanAfter time.Duration)
go func(){
    for {
        time.Sleep(60 * time.Second)
        hippo.CleanupCallers(60)
    }
}()

Logger Component

logger, _ := hippo.NewLogger("debug", "json", []string{"stdout", "/var/log/error.log"})

logger.Info("Hello World!")
logger.Debug("Hello World!")
logger.Warn("Hello World!")
logger.Error("Hello World!")

defer logger.Sync()

// check if path exists
exists := hippo.PathExists("/var/log")

// check if file exists
exists := hippo.FileExists("/var/log/error.log")

// check if dir exists
exists := hippo.DirExists("/var/log")

// ensure that dir exists
exists, err := hippo.EnsureDir("/var/log", 755)

Latency Tracker Component

httpClient := hippo.NewHTTPClient()

latency := hippo.NewLatencyTracker()
latency.NewAction("api.call")

// First HTTP Call
start := time.Now()
httpClient.Get(
    "https://httpbin.org/get",
    map[string]string{},
    map[string]string{},
)
latency.SetPoint("api.call", start, time.Now())

// Another HTTP Call
latency.SetStart("api.call", time.Now())
httpClient.Get(
    "https://httpbin.org/get",
    map[string]string{},
    map[string]string{},
)
latency.SetEnd("api.call", time.Now())

// Now it will calculate the average
fmt.Println(latency.GetLatency("api.call"))
// Output 486.217112ms <nil>

Versioning

For transparency into our release cycle and in striving to maintain backward compatibility, Hippo is maintained under the Semantic Versioning guidelines and release process is predictable and business-friendly.

See the Releases section of our GitHub project for changelogs for each release version of Hippo. It contains summaries of the most noteworthy changes made in each release.

Bug tracker

If you have any suggestions, bug reports, or annoyances please report them to our issue tracker at https://github.com/clivern/hippo/issues

Security Issues

If you discover a security vulnerability within Hippo, please send an email to [email protected]

Contributing

We are an open source, community-driven project so please feel free to join us. see the contributing guidelines for more details.

License

© 2019, Clivern. Released under MIT License.

Hippo is authored and maintained by @Clivern.

Comments
  • fix(deps): update module github.com/go-redis/redis to v8

    fix(deps): update module github.com/go-redis/redis to v8

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | github.com/go-redis/redis | require | major | v6.15.9+incompatible -> v8.8.2 |


    Release Notes

    go-redis/redis

    v8.8.2

    Compare Source

    v8.8.1

    Compare Source

    v8.8.0

    Compare Source

    v8.7.1

    Compare Source

    v8.7.0

    Compare Source

    v8.6.0

    Compare Source

    v8.5.0

    Compare Source

    v8.4.11

    Compare Source

    v8.4.10

    Compare Source

    v8.4.9

    Compare Source

    v8.4.8

    Compare Source

    v8.4.7

    Compare Source

    v8.4.6

    Compare Source

    v8.4.5

    Compare Source

    v8.4.4

    Compare Source

    v8.4.3

    Compare Source

    v8.4.2

    Compare Source

    v8.4.1

    Compare Source

    v8.4.0

    Compare Source

    v8.3.4

    Compare Source

    v8.3.3

    Compare Source

    v8.3.2

    Compare Source

    v8.3.1

    Compare Source

    v8.3.0

    Compare Source

    v8.2.3

    Compare Source

    v8.2.2

    Compare Source

    v8.2.1

    Compare Source

    v8.2.0

    Compare Source

    v8.1.3

    Compare Source

    v8.1.2

    Compare Source

    v8.1.1

    Compare Source

    v8.1.0

    Compare Source

    v8.0.0

    Compare Source

    v7.4.0

    Compare Source

    v7.3.0

    Compare Source

    v7.2.0

    Compare Source

    v7.1.0

    Compare Source

    v7.0.1

    Compare Source

    v7.0.0

    Compare Source


    Configuration

    :date: Schedule: At any time (no schedule defined).

    :vertical_traffic_light: Automerge: Disabled by config. Please merge this manually once you are satisfied.

    :recycle: Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    :no_bell: Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

  • fix(deps): update golang.org/x/time digest to f3bd1da - autoclosed

    fix(deps): update golang.org/x/time digest to f3bd1da - autoclosed

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | golang.org/x/time | require | digest | f8bda1e -> f3bd1da |


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, click this checkbox.

    This PR has been generated by Mend Renovate. View repository job log here.

  • fix(deps): update module go.uber.org/zap to v1.17.0

    fix(deps): update module go.uber.org/zap to v1.17.0

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | go.uber.org/zap | require | minor | v1.16.0 -> v1.17.0 |


    Release Notes

    uber-go/zap

    v1.17.0

    Compare Source

    Bugfixes:

    • #​867: Encode <nil> for nil error instead of a panic.
    • #​931, #​936: Update minimum version constraints to address vulnerabilities in dependencies.

    Enhancements:

    • #​865: Improve alignment of fields of the Logger struct, reducing its size from 96 to 80 bytes.
    • #​881: Support grpclog.LoggerV2 in zapgrpc.
    • #​903: Support URL-encoded POST requests to the AtomicLevel HTTP handler with the application/x-www-form-urlencoded content type.
    • #​912: Support multi-field encoding with zap.Inline.
    • #​913: Speed up SugaredLogger for calls with a single string.
    • #​928: Add support for filtering by field name to zaptest/observer.

    Thanks to @​ash2k, @​FMLS, @​jimmystewpot, @​Oncilla, @​tsoslow, @​tylitianrui, @​withshubh, and @​wziww for their contributions to this release.


    Configuration

    📅 Schedule: At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    ♻️ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

  • fix(deps): update golang.org/x/time commit hash to f8bda1e

    fix(deps): update golang.org/x/time commit hash to f8bda1e

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | golang.org/x/time | require | digest | 3af7569 -> f8bda1e |


    Configuration

    :date: Schedule: At any time (no schedule defined).

    :vertical_traffic_light: Automerge: Disabled by config. Please merge this manually once you are satisfied.

    :recycle: Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    :no_bell: Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box.

    This PR has been generated by WhiteSource Renovate. View repository job log here.

  • chore(deps): update golang.org/x/time commit hash to 7e3f01d - autoclosed

    chore(deps): update golang.org/x/time commit hash to 7e3f01d - autoclosed

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | golang.org/x/time | require | digest | 3af7569 -> 7e3f01d |


    Renovate configuration

    :date: Schedule: At any time (no schedule defined).

    :vertical_traffic_light: Automerge: Disabled by config. Please merge this manually once you are satisfied.

    :recycle: Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    :no_bell: Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by WhiteSource Renovate. View repository job log here.

  • chore(deps): update module go.uber.org/zap to v1.16.0

    chore(deps): update module go.uber.org/zap to v1.16.0

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | go.uber.org/zap | require | minor | v1.15.0 -> v1.16.0 |


    Release Notes

    uber-go/zap

    v1.16.0

    Compare Source

    Bugfixes:

    • #​828: Fix missing newline in IncreaseLevel error messages.
    • #​835: Fix panic in JSON encoder when encoding times or durations without specifying a time or duration encoder.
    • #​843: Honor CallerSkip when taking stack traces.
    • #​862: Fix the default file permissions to use 0666 and rely on the umask instead.
    • #​854: Encode <nil> for nil Stringer instead of a panic error log.

    Enhancements:

    • #​629: Added zapcore.TimeEncoderOfLayout to easily create time encoders for custom layouts.
    • #​697: Added support for a configurable delimiter in the console encoder.
    • #​852: Optimize console encoder by pooling the underlying JSON encoder.
    • #​844: Add ability to include the calling function as part of logs.
    • #​843: Add StackSkip for including truncated stacks as a field.
    • #​861: Add options to customize Fatal behaviour for better testability.

    Thanks to @​SteelPhase, @​tmshn, @​lixingwang, @​wyxloading, @​moul, @​segevfiner, @​andy-retailnext and @​jcorbin for their contributions to this release.


    Renovate configuration

    :date: Schedule: At any time (no schedule defined).

    :vertical_traffic_light: Automerge: Disabled by config. Please merge this manually once you are satisfied.

    :recycle: Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    :no_bell: Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by WhiteSource Renovate. View repository job log here.

  • chore(deps): update module go-redis/redis to v6.15.9

    chore(deps): update module go-redis/redis to v6.15.9

    WhiteSource Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | github.com/go-redis/redis | require | patch | v6.15.8+incompatible -> v6.15.9 |


    Release Notes

    go-redis/redis

    v6.15.9

    Compare Source


    Renovate configuration

    :date: Schedule: At any time (no schedule defined).

    :vertical_traffic_light: Automerge: Disabled by config. Please merge this manually once you are satisfied.

    :recycle: Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    :no_bell: Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by WhiteSource Renovate. View repository job log here.

  • chore(deps): update module go-redis/redis to v7- autoclosed

    chore(deps): update module go-redis/redis to v7- autoclosed

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | github.com/go-redis/redis | require | major | v6.15.8+incompatible -> v7.4.0 |


    Release Notes

    go-redis/redis

    v7.4.0

    Compare Source

    v7.3.0

    Compare Source

    v7.2.0

    Compare Source

    v7.1.0

    Compare Source

    v7.0.1

    Compare Source

    v7.0.0

    Compare Source

    v6.15.9

    Compare Source


    Renovate configuration

    :date: Schedule: At any time (no schedule defined).

    :vertical_traffic_light: Automerge: Disabled by config. Please merge this manually once you are satisfied.

    :recycle: Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    :no_bell: Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by WhiteSource Renovate. View repository job log here.

  • Configure Hippo

    Configure Hippo

    Welcome to Hippo! This is an onboarding PR to help you understand and configure your workflow.

    :vertical_traffic_light: To activate Hippo, merge this Pull Request. To disable Hippo, simply close this Pull Request.


    :question: Got questions? Check out Hippo's Docs, Particularly the Wiki section. If you need any further assistance then you can also request help here.


    This PR has been generated by Hippo Workflow Automation Bot. This PR Closes #109

  • Configure Hippo

    Configure Hippo

    Welcome to Hippo! This is an onboarding PR to help you understand and configure your workflow.

    :vertical_traffic_light: To activate Hippo, merge this Pull Request. To disable Hippo, simply close this Pull Request.


    :question: Got questions? Check out Hippo's Docs, Particularly the Wiki section. If you need any further assistance then you can also request help here.


    This PR has been generated by Hippo Workflow Automation Bot. This PR Closes #107

  • Configure Hippo

    Configure Hippo

    Welcome to Hippo! This is an onboarding PR to help you understand and configure your workflow.

    :vertical_traffic_light: To activate Hippo, merge this Pull Request. To disable Hippo, simply close this Pull Request.


    :question: Got questions? Check out Hippo's Docs, Particularly the Wiki section. If you need any further assistance then you can also request help here.


    This PR has been generated by Hippo Workflow Automation Bot. This PR Closes #105

  • fix(deps): update module golang.org/x/time to v0.2.0

    fix(deps): update module golang.org/x/time to v0.2.0

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | golang.org/x/time | require | minor | v0.0.0-20210220033141-f8bda1e9f3ba -> v0.2.0 |


    Release Notes

    golang/time

    v0.2.0

    Compare Source


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

  • chore(deps): update module go to 1.19

    chore(deps): update module go to 1.19

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | go (source) | golang | minor | 1.14 -> 1.19 |


    Release Notes

    golang/go

    v1.19.3

    v1.19.2

    v1.19.1

    v1.19.0

    v1.18.8

    v1.18.7

    v1.18.6

    v1.18.5

    v1.18.4

    v1.18.3

    v1.18.2

    v1.18.1

    v1.18.0

    v1.17.13

    v1.17.12

    v1.17.11

    v1.17.10

    v1.17.9

    v1.17.8

    v1.17.7

    v1.17.6

    v1.17.5

    v1.17.4

    v1.17.3

    v1.17.2

    v1.17.1

    v1.17.0

    v1.16.15

    v1.16.14

    v1.16.13

    v1.16.12

    v1.16.11

    v1.16.10

    v1.16.9

    v1.16.8

    v1.16.7

    v1.16.6

    v1.16.5

    v1.16.4

    v1.16.3

    v1.16.2

    v1.16.1

    v1.15.15

    v1.15.14

    v1.15.13

    v1.15.12

    v1.15.11

    v1.15.10

    v1.15.9

    v1.15.8

    v1.15.7

    v1.15.6

    v1.15.5

    v1.15.4

    v1.15.3

    v1.15.2

    v1.15.1


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

  • Dependency Dashboard

    Dependency Dashboard

    This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

    Open

    These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

    Detected dependencies

    gomod
    go.mod
    • go 1.14
    • github.com/go-redis/redis v6.15.9+incompatible
    • github.com/nbio/st v0.0.0-20140626010706-e9e8d9816f32@e9e8d9816f32
    • github.com/satori/go.uuid v1.2.0
    • go.uber.org/zap v1.17.0
    • golang.org/x/time v0.0.0-20210220033141-f8bda1e9f3ba@f8bda1e9f3ba

    • [ ] Check this box to trigger a request for Renovate to run again on this repository
  • fix(deps): update module go.uber.org/zap to v1.23.0

    fix(deps): update module go.uber.org/zap to v1.23.0

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | |---|---|---|---| | go.uber.org/zap | require | minor | v1.17.0 -> v1.23.0 |


    Release Notes

    uber-go/zap

    v1.23.0

    Compare Source

    Enhancements:

    • #​1147: Add a zapcore.LevelOf function to determine the level of a LevelEnabler or Core.
    • #​1155: Add zap.Stringers field constructor to log arrays of objects that implement String() string.

    v1.22.0

    Compare Source

    Enhancements:

    • #​1071: Add zap.Objects and zap.ObjectValues field constructors to log arrays of objects. With these two constructors, you don't need to implement zapcore.ArrayMarshaler for use with zap.Array if those objects implement zapcore.ObjectMarshaler.
    • #​1079: Add SugaredLogger.WithOptions to build a copy of an existing SugaredLogger with the provided options applied.
    • #​1080: Add *ln variants to SugaredLogger for each log level. These functions provide a string joining behavior similar to fmt.Println.
    • #​1088: Add zap.WithFatalHook option to control the behavior of the logger for Fatal-level log entries. This defaults to exiting the program.
    • #​1108: Add a zap.Must function that you can use with NewProduction or NewDevelopment to panic if the system was unable to build the logger.
    • #​1118: Add a Logger.Log method that allows specifying the log level for a statement dynamically.

    Thanks to @​cardil, @​craigpastro, @​sashamelentyev, @​shota3506, and @​zhupeijun for their contributions to this release.

    v1.21.0

    Compare Source

    1.21.0 (7 Feb 2022)

    Enhancements:

    • #​1047: Add zapcore.ParseLevel to parse a Level from a string.
    • #​1048: Add zap.ParseAtomicLevel to parse an AtomicLevel from a string.

    Bugfixes:

    • #​1058: Fix panic in JSON encoder when EncodeLevel is unset.

    Other changes:

    • #​1052: Improve encoding performance when the AddCaller and AddStacktrace options are used together.

    Thanks to @​aerosol and @​Techassi for their contributions to this release.

    v1.20.0

    Compare Source

    Enhancements:

    • #​989: Add EncoderConfig.SkipLineEnding flag to disable adding newline characters between log statements.
    • #​1039: Add EncoderConfig.NewReflectedEncoder field to customize JSON encoding of reflected log fields.

    Bugfixes:

    • #​1011: Fix inaccurate precision when encoding complex64 as JSON.
    • #​554, #​1017: Close JSON namespaces opened in MarshalLogObject methods when the methods return.
    • #​1033: Avoid panicking in Sampler core if thereafter is zero.

    Other changes:

    Thanks to @​psrajat, @​lruggieri, @​sammyrnycreal for their contributions to this release.

    v1.19.1

    Compare Source

    Fixed
    • #​1001: JSON: Fix complex number encoding with negative imaginary part. Thanks to @​hemantjadon.
    • #​1003: JSON: Fix inaccurate precision when encoding float32.

    v1.19.0

    Compare Source

    Enhancements:

    • #​975: Avoid panicking in Sampler core if the level is out of bounds.
    • #​984: Reduce the size of BufferedWriteSyncer by aligning the fields better.

    Thanks to @​lancoLiu and @​thockin for their contributions to this release.

    v1.18.1

    Compare Source

    Bugfixes:

    • #​974: Fix nil dereference in logger constructed by zap.NewNop.

    v1.18.0

    Compare Source

    Enhancements:

    • #​961: Add zapcore.BufferedWriteSyncer, a new WriteSyncer that buffers messages in-memory and flushes them periodically.
    • #​971: Add zapio.Writer to use a Zap logger as an io.Writer.
    • #​897: Add zap.WithClock option to control the source of time via the new zapcore.Clock interface.
    • #​949: Avoid panicking in zap.SugaredLogger when arguments of *w methods don't match expectations.
    • #​943: Add support for filtering by level or arbitrary matcher function to zaptest/observer.
    • #​691: Comply with io.StringWriter and io.ByteWriter in Zap's buffer.Buffer.

    Thanks to @​atrn0, @​ernado, @​heyanfu, @​hnlq715, @​zchee for their contributions to this release.


    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    🔕 Ignore: Close this PR and you won't be reminded about this update again.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

Glue - Robust Go and Javascript Socket Library (Alternative to Socket.io)

Glue - Robust Go and Javascript Socket Library Glue is a real-time bidirectional socket library. It is a clean, robust and efficient alternative to so

Nov 25, 2022
Mizu - API traffic viewer for Kubernetes enabling you to view all API communication between microservices
Mizu - API traffic viewer for Kubernetes enabling you to view all API communication between microservices

The API Traffic Viewer for Kubernetes A simple-yet-powerful API traffic viewer f

Jan 9, 2023
Go client to reliable queues based on Redis Cluster Streams

Ami Go client to reliable queues based on Redis Cluster Streams. Consume/produce performance Performance is dependent from: Redis Cluster nodes count;

Dec 12, 2022
Asynq: simple, reliable, and efficient distributed task queue in Go
Asynq: simple, reliable, and efficient distributed task queue in Go

Asynq Overview Asynq is a Go library for queueing tasks and processing them asynchronously with workers. It's backed by Redis and is designed to be sc

Dec 30, 2022
RapidMQ is a pure, extremely productive, lightweight and reliable library for managing of the local messages queue

RapidMQ RapidMQ is a pure, extremely productive, lightweight and reliable library for managing of the local messages queue in the Go programming langu

Sep 27, 2022
GTA(Go Task Async) is a lightweight reliable asynchronous task and transaction message library for Golang

GTA (Go Task Async) is a lightweight and reliable asynchronous task and transaction message library for by golang.

Jun 4, 2022
The Xiaomi message push service is a system-level channel on MIUI and is universal across the platform, which can provide developers with stable, reliable, and efficient push services.

Go-Push-API MiPush、JiPush、UMeng MiPush The Xiaomi message push service is a system-level channel on MIUI and is universal across the platform, which c

Oct 20, 2022
A lightweight, distributed and reliable message queue based on Redis

nmq A lightweight, distributed and reliable message queue based on Redis Get Started Download go get github.com/inuggets/nmq Usage import "github.com

Nov 22, 2021
A generic oplog/replication system for microservices
A generic oplog/replication system for microservices

REST Operation Log OpLog is used as a real-time data synchronization layer between a producer and consumers. Basically, it's a generic database replic

Oct 23, 2022
Go gRPC Kafka CQRS microservices with tracing

Golang CQRS Kafka gRPC Postgresql MongoDB Redis microservices example ?? ??‍?? Full list what has been used: Kafka as messages broker gRPC Go implemen

Jan 1, 2023
Example Golang Event-Driven with kafka Microservices Choreography

Microservices Choreography A demonstration for event sourcing using Go and Kafka example Microservices Choreography. To run this project: Install Go I

Dec 2, 2021
💨 A real time messaging system to build a scalable in-app notifications, multiplayer games, chat apps in web and mobile apps.
💨 A real time messaging system to build a scalable in-app notifications, multiplayer games, chat apps in web and mobile apps.

Beaver A Real Time Messaging Server. Beaver is a real-time messaging server. With beaver you can easily build scalable in-app notifications, realtime

Jan 1, 2023
Build event-driven and event streaming applications with ease

Commander ?? Commander is Go library for writing event-driven applications. Enabling event sourcing, RPC over messages, SAGA's, bidirectional streamin

Dec 19, 2022
⚡️ A lightweight service that will build and store your go projects binaries, Integrated with Github, Gitlab, Bitbucket and Bitbucket Server.
⚡️ A lightweight service that will build and store your go projects binaries, Integrated with Github, Gitlab, Bitbucket and  Bitbucket Server.

Rabbit A lightweight service that will build and store your go projects binaries. Rabbit is a lightweight service that will build and store your go pr

Nov 19, 2022
Build platforms that flexibly mix SQL, batch, and stream processing paradigms

Overview Gazette makes it easy to build platforms that flexibly mix SQL, batch, and millisecond-latency streaming processing paradigms. It enables tea

Dec 12, 2022
🔥 A fast and beautiful command line tool to build API requests.
🔥 A fast and beautiful command line tool to build API requests.

Poodle A fast and beautiful command line tool to build API requests ?? Check out the full Demo! Poodle is an interactive command line tool to build an

Aug 23, 2022
Go library to build event driven applications easily using AMQP as a backend.

event Go library to build event driven applications easily using AMQP as a backend. Publisher package main import ( "github.com/creekorful/event" "

Dec 5, 2021
An opinionated package that helps you print user-friendly output messages from your Go command line applications.

github.com/eth-p/clout (Command Line Output) clout is a package that helps you print user-friendly output messages from your Go command line applicati

Jan 15, 2022
GopherSay allow you to display a message said by a cute random Gopher.

GopherSay About Welcome in GopherSay! GopherSay is inspired by Cowsay program. GopherSay allow you to display a message said by a cute random Gopher.

Nov 23, 2022