All Projects → rafaeljesus → retry-go

rafaeljesus / retry-go

Licence: MIT License
Retrying made simple and easy for golang 🔁

Programming Languages

go
31211 projects - #10 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to retry-go

outboxer
A library that implements the outboxer pattern in go
Stars: ✭ 90 (+109.3%)
Mutual labels:  distributed-systems, resiliency
Fluentdispatch
🌊 .NET Standard 2.1 framework which makes easy to scaffold distributed systems and dispatch incoming load into units of work in a deterministic way.
Stars: ✭ 152 (+253.49%)
Mutual labels:  distributed-systems, resiliency
chapar
A framework for verification of causal consistency for distributed key-value stores and their clients in Coq [maintainer=@palmskog]
Stars: ✭ 29 (-32.56%)
Mutual labels:  distributed-systems
road-to-orleans
This repository illustrates the road to orleans with practical, real-life examples. From most basic, to more advanced techniques.
Stars: ✭ 55 (+27.91%)
Mutual labels:  distributed-systems
XLearning-GPU
qihoo360 xlearning with GPU support; AI on Hadoop
Stars: ✭ 22 (-48.84%)
Mutual labels:  distributed-systems
privacy-preserving-primitives
primitives and protocols for implementing privacy preserving networks
Stars: ✭ 14 (-67.44%)
Mutual labels:  distributed-systems
elixir cluster
Distributed Elixir Cluster on Render with libcluster and Mix Releases
Stars: ✭ 15 (-65.12%)
Mutual labels:  distributed-systems
realtimemap-dotnet
A showcase for Proto.Actor - an ultra-fast distributed actors solution for Go, C#, and Java/Kotlin.
Stars: ✭ 47 (+9.3%)
Mutual labels:  distributed-systems
campaign
Comic Relief Campaign Distribution in Drupal 8
Stars: ✭ 22 (-48.84%)
Mutual labels:  distributed-systems
Knowledge-Discovery-Agents
A Goal-Oriented Approach to Knowledge Discovery in Multi-Agent Systems
Stars: ✭ 38 (-11.63%)
Mutual labels:  distributed-systems
core
Microservice abstract class
Stars: ✭ 37 (-13.95%)
Mutual labels:  distributed-systems
DTC
DTC is a high performance Distributed Table Cache system designed by JD.com that offering hotspot data cache for databases in order to reduce pressure of database and improve QPS.
Stars: ✭ 21 (-51.16%)
Mutual labels:  distributed-systems
Layr
A decentralized (p2p) file storage system built atop Kademlia DHT that enforces data integrity, privacy, and availability through sharding, proofs of retrievability, redundancy, and encryption, with smart-contract powered incentive scheme
Stars: ✭ 90 (+109.3%)
Mutual labels:  distributed-systems
ring-election
A node js library with a distributed leader/follower algorithm ready to be used
Stars: ✭ 92 (+113.95%)
Mutual labels:  distributed-systems
v6d
vineyard (v6d): an in-memory immutable data manager. (Project under CNCF)
Stars: ✭ 557 (+1195.35%)
Mutual labels:  distributed-systems
Kites
🪁 A consistency, partition tolerance completed distributed KV store, implementation of the Raft distributed consensus protocol and Kotlin.
Stars: ✭ 41 (-4.65%)
Mutual labels:  distributed-systems
epaxos
A pluggable implementation of the Egalitarian Paxos Consensus Protocol
Stars: ✭ 39 (-9.3%)
Mutual labels:  distributed-systems
perseverance
Make your functions 💪 resilient and 🚥 fail-fast to 💩 failures or ⌚ delays
Stars: ✭ 12 (-72.09%)
Mutual labels:  resiliency
reactive-pipes
A thin library around Reactive Extensions to simplify writing evented applications in C#.
Stars: ✭ 12 (-72.09%)
Mutual labels:  distributed-systems
mesomatic
A simple and idiomatic Clojure facade around the Mesos JAVA API
Stars: ✭ 68 (+58.14%)
Mutual labels:  distributed-systems

retry-go

  • Retrying made simple and easy for golang.

Installation

go get -u github.com/rafaeljesus/retry-go

Usage

Do

package main

import (
  "time"

  "github.com/rafaeljesus/retry-go"
)

func main() {
  attempts := 3
  sleepTime := time.Second*2
  if err := retry.Do(func() error {
    return work()
  }, attempts, sleepTime); err != nil {
    // Retry failed
  }
}

DoHTTP

package main

import (
  "time"

  "github.com/rafaeljesus/retry-go"
)

func main() {
  attempts := 3
  sleepTime := time.Second*2
  if err := retry.DoHTTP(func() (*http.Response, error) {
    return makeRequest()
  }, attempts, sleepTime); err != nil {
    // Retry failed
  }
}

Contributing

  • Fork it
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create new Pull Request

Badges

Build Status Go Report Card Go Doc


GitHub @rafaeljesus  ·  Medium @_jesus_rafael  ·  Twitter @_jesus_rafael

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].