All Projects → Code-Hex → retrygroup

Code-Hex / retrygroup

Licence: other
Package retrygroup provides synchronization, Context cancelation for groups of retry goroutines working on subtasks of a common task.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to retrygroup

captcha
Go package captcha generation and verification of image, Refer from https://github.com/dchest/captcha. Use captcha pool generation
Stars: ✭ 29 (+61.11%)
Mutual labels:  context, goroutine
Gollback
Go asynchronous simple function utilities, for managing execution of closures and callbacks
Stars: ✭ 55 (+205.56%)
Mutual labels:  retry, goroutine
Routine
go routine control, abstraction of the Main and some useful Executors.如果你不会管理Goroutine的话,用它
Stars: ✭ 40 (+122.22%)
Mutual labels:  retry, goroutine
context
A proof of concept implementation of scoped context
Stars: ✭ 16 (-11.11%)
Mutual labels:  context, goroutine
node-red-contrib-FIWARE official
FIWARE-Node-Red integration supporting NGSI-LD
Stars: ✭ 14 (-22.22%)
Mutual labels:  context
flow
C++14, header-only library for multi-stream data synchronization.
Stars: ✭ 26 (+44.44%)
Mutual labels:  synchronization
locize-cli
locize cli to import / export locales, add / edit / remove sync segments
Stars: ✭ 44 (+144.44%)
Mutual labels:  synchronization
deployer-extended-database
Deployer tasks to manage database synchronization between application instances.
Stars: ✭ 32 (+77.78%)
Mutual labels:  synchronization
mine
Share application state across computers using Dropbox.
Stars: ✭ 14 (-22.22%)
Mutual labels:  synchronization
laravel-react-spa
A Laravel-React SPA starter project template.
Stars: ✭ 94 (+422.22%)
Mutual labels:  context
java-sdk
一些常用的java sdk和工具类(日期工具类,分布式锁,redis缓存,二叉树,反射工具类,线程池,对称/非对称/分段加解密,json序列化,http工具,雪花算法,字符串相似度,集合操作工具,xml解析,重试Retry工具类,Jvm监控等)
Stars: ✭ 26 (+44.44%)
Mutual labels:  retry
contextual
🌈 Generate your Ecto contexts using this macro and eliminate boilerplate
Stars: ✭ 18 (+0%)
Mutual labels:  context
goroutine-pool
A simple goroutine pool which can create and release goroutine dynamically, inspired by fasthttp.
Stars: ✭ 31 (+72.22%)
Mutual labels:  goroutine
chanbroker
ChanBroker, a Broker for goroutine, is simliar to kafka
Stars: ✭ 61 (+238.89%)
Mutual labels:  goroutine
ParseCareKit
Securely synchronize any CareKit 2.1+ based app to a Parse Server Cloud. Compatible with parse-hipaa.
Stars: ✭ 28 (+55.56%)
Mutual labels:  synchronization
Zaloha2.sh
Small and simple directory synchronizer (a BASH script)
Stars: ✭ 50 (+177.78%)
Mutual labels:  synchronization
braid-spec
Working area for Braid extensions to HTTP
Stars: ✭ 179 (+894.44%)
Mutual labels:  synchronization
watchdb
Keeping SQLite databases in sync
Stars: ✭ 72 (+300%)
Mutual labels:  synchronization
typescript-retry-decorator
lightweight typescript retry decorator with 0 dependency.
Stars: ✭ 50 (+177.78%)
Mutual labels:  retry
janus-gateway-live
RTMP edge speed with janus-gateway
Stars: ✭ 38 (+111.11%)
Mutual labels:  synchronization

retrygroup

GoDoc
Package retrygroup provides synchronization, Context cancelation for groups of retry goroutines working on subtasks of a common task.

Synopsis

package main

import (
	"context"
	"errors"
	"fmt"
	"time"

	"github.com/Code-Hex/retrygroup"
)

func main() {
	ctx, cancel := context.WithCancel(context.Background())
	g, _ := retrygroup.WithContext(ctx)
	g.EnableBackoff()

	go func() {
		<-time.After(16 * time.Second)
		if cancel != nil {
			fmt.Println("Finish!!")
			cancel()
		}
	}()

	g.RetryGo(3, func(i int) error {
		fmt.Printf("Hello: %d\n", i)
		return errors.New("Try error")
	})

	g.RetryGo(-1, func(i int) error {
		fmt.Println("Never!!")
		return errors.New("Try never error")
	})

	g.Wait()
}

See eg

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].