this is a funny client for jsonrpc-client. it can support timeout,breaker ...

tfjsonrpc-client

1. intro

this is a funny client for jsonrpc-client. it can support timeout,breaker ...

2. demo

    var (
		url    = "http://test.com/rpc/user"
		method = "test-rpc"
		params = map[string]interface{}{
			"param1": 1,
		}
	)
	jsonClient := &JsonRpcClient{}
	result, err := jsonClient.Call(context.Background(), url, method, params)
	if err != nil {
		fmt.Println("jsonrpc request error:", err.Error())
		return
	}
	if result.Error != nil {
		fmt.Println("jsonrpc result error:", result.Error)
		return
	}
	if result.Result == nil {
		fmt.Println("jsonrpc result error: result is nil")
		return
	}
	t.Log("jsonrpc success:", result.Result)

3. breaker describe

title describe default
Threshold breaker reached value. key include (jsonRpcUrl+jsonRpc) 500
Expire breakerKey expired time. 5 min
DryRunPercent when breaker is opened, there is ?% requests can pass breaker, if one of those success, breaker is closed. 10%
Owner
Lion
im a panda, but i like code
Lion
Similar Resources

A lightweight job scheduler based on priority queue with timeout, retry, replica, context cancellation and easy semantics for job chaining. Build for golang web apps.

Table of Contents Introduction What is RIO? Concern An asynchronous job processor Easy management of these goroutines and chaining them Introduction W

Dec 9, 2022

Timeout handler for http request in Gin framework

Middleware to Handle Request Timeout in Gin Installation Installation go get github.com/s-wijaya/gin-timeout Import it in your code: import ( // o

Dec 14, 2021

Executes jobs in separate GO routines. Provides Timeout, StartTime controls. Provides Cancel all running job before new job is run.

jobExecutor Library to execute jobs in GO routines. Provides for Job Timeout/Deadline (MaxDuration()) Job Start WallClock control (When()) Add a job b

Jan 10, 2022

Timeout - Create a REST API service in Go

Technical Assignment ###Create a REST API service in Go. The API should consist

Jan 10, 2022

Go-http-sleep: Delayed response http server, useful for testing various timeout issue for application running behind proxy

delayed response http server, useful for testing various timeout issue for application running behind proxy

Jan 22, 2022

[爬虫框架 (golang)] An awesome Go concurrent Crawler(spider) framework. The crawler is flexible and modular. It can be expanded to an Individualized crawler easily or you can use the default crawl components only.

go_spider A crawler of vertical communities achieved by GOLANG. Latest stable Release: Version 1.2 (Sep 23, 2014). QQ群号:337344607 Features Concurrent

Dec 30, 2022

[爬虫框架 (golang)] An awesome Go concurrent Crawler(spider) framework. The crawler is flexible and modular. It can be expanded to an Individualized crawler easily or you can use the default crawl components only.

go_spider A crawler of vertical communities achieved by GOLANG. Latest stable Release: Version 1.2 (Sep 23, 2014). QQ群号:337344607 Features Concurrent

Jan 6, 2023

CLI tool that can execute SQL queries on CSV, LTSV, JSON and TBLN. Can output to various formats.

CLI tool that can execute SQL queries on CSV, LTSV, JSON and TBLN. Can output to various formats.

trdsql CLI tool that can execute SQL queries on CSV, LTSV, JSON and TBLN. It is a tool like q, textql and others. The difference from these tools is t

Jan 1, 2023

Simple tool to handle hosts file black lists that can remove comments, remove duplicates, compress to 9 domains per line, add IPv6 entries, as well as can convert black lists to multiple other black list formats compatible with other software.

Hosts-BL Simple tool to handle hosts file black lists that can remove comments, remove duplicates, compress to 9 domains per line, add IPv6 entries, a

Sep 23, 2022

A microservice gateway developed based on golang.With a variety of plug-ins which can be expanded by itself, plug and play. what's more,it can quickly help enterprises manage API services and improve the stability and security of API services.

A microservice gateway developed based on golang.With a variety of plug-ins which can be expanded by itself, plug and play. what's more,it can quickly help enterprises manage API services and improve the stability and security of API services.

Goku API gateway is a microservice gateway developed based on golang. It can achieve the purposes of high-performance HTTP API forwarding, multi tenant management, API access control, etc. it has a powerful custom plug-in system, which can be expanded by itself, and can quickly help enterprises manage API services and improve the stability and security of API services.

Dec 29, 2022

This web app made with Go, and database handled with GraphQL lets me decide what to watch next! I can wishlist or mark a movie watched to manage my movie watchlist. Users worldwide can suggest me anything to watch and add it to my watchlist.

This web app made with Go, and database handled with GraphQL lets me decide what to watch next! I can wishlist or mark a movie watched to manage my movie watchlist. Users worldwide can suggest me anything to watch and add it to my watchlist.

Next-watch website - Next watch Introduction This web app made with Go, and database handled with GraphQL lets me decide what to watch next! I can wis

Oct 1, 2021

Rename-pvc can rename PersistentVolumeClaims (PVCs) inside KubernetesRename-pvc can rename PersistentVolumeClaims (PVCs) inside Kubernetes

rename-pvc rename-pvc can rename PersistentVolumeClaims (PVCs) inside Kubernetes. ⚠️ Be sure to create a backup of your data in the PVC before using r

Oct 31, 2022

A Xray backend framework that can easily support many panels. 一个基于Xray的后端框架,支持V2ay,Trojan,Shadowsocks协议,极易扩展,支持多面板对接

XRayR A Xray backend framework that can easily support many panels. 一个基于Xray的后端框架,支持V2ay,Trojan,Shadowsocks协议,极易扩展,支持多面板对接。 如果您喜欢本项目,可以右上角点个star+watch

Jan 4, 2023

Go-based search engine URL collector , support Google, Bing, can be based on Google syntax batch collection URL

Go-based search engine URL collector , support Google, Bing, can be based on Google syntax batch collection URL

Go-based search engine URL collector , support Google, Bing, can be based on Google syntax batch collection URL

Nov 9, 2022

A db proxy for distributed transaction, read write splitting and sharding! Support any language! It can be deployed as a sidecar in a pod.

A db proxy for distributed transaction, read write splitting and sharding! Support any language! It can be deployed as a sidecar in a pod.

DBPack DBPack means a database cluster tool pack. It can be deployed as a sidecar in a pod, it shields complex basic logic, so that business developme

Dec 29, 2022

Database Abstraction Layer (dbal) for Go. Support SQL builder and get result easily (now only support mysql)

godbal Database Abstraction Layer (dbal) for go (now only support mysql) Motivation I wanted a DBAL that No ORM、No Reflect、Concurrency Save, support S

Nov 17, 2022

Replacement of ApacheBench(ab), support for transactional requests, support for command line and package references to HTTP stress testing tool.

stress stress is an HTTP stress testing tool. Through this tool, you can do a stress test on the HTTP service and get detailed test results. It is ins

Aug 23, 2022

🎨 Terminal color rendering library, support 8/16 colors, 256 colors, RGB color rendering output, support Print/Sprintf methods, compatible with Windows.

🎨 Terminal color rendering library, support 8/16 colors, 256 colors, RGB color rendering output, support Print/Sprintf methods, compatible with Windows.

🎨 Terminal color rendering library, support 8/16 colors, 256 colors, RGB color rendering output, support Print/Sprintf methods, compatible with Windows. GO CLI 控制台颜色渲染工具库,支持16色,256色,RGB色彩渲染输出,使用类似于 Print/Sprintf,兼容并支持 Windows 环境的色彩渲染

Dec 30, 2022
Timeout wraps a handler and aborts the process of the handler if the timeout is reached.

Timeout Timeout wraps a handler and aborts the process of the handler if the timeout is reached. Example package main import ( "context" "fmt" "gi

Jan 8, 2022
The jsonrpc package helps implement of JSON-RPC 2.0

jsonrpc About Simple, Poetic, Pithy. No reflect package. But reflect package is used only when invoke the debug handler. Support GAE/Go Standard Envir

Dec 17, 2022
A lib of golang which contains many funny api;

A lib of golang which contains many funny api; I created it cause I could not find these more-effient apis from other repo.

Oct 27, 2021
A funny utility to manage your PS1 variable.
A funny utility to manage your PS1 variable.

PSOne Introduction Are you a Veteran Unix Admin? If so, you probably know the charm of the PS1 environment variable. For a deep focus I suggest you to

Oct 23, 2022
Winslow Synth - Make funny sounds with Go
Winslow Synth - Make funny sounds with Go

Winslow Synth Make funny sounds with Go Installation Getting audio drivers to work properly with Golang has proven tricky. This setup is working for m

Aug 23, 2022
An efficient and feature complete Hystrix like Go implementation of the circuit breaker pattern.
An efficient and feature complete Hystrix like Go implementation of the circuit breaker pattern.

Circuit Circuit is an efficient and feature complete Hystrix like Go implementation of the circuit breaker pattern. Learn more about the problems Hyst

Dec 28, 2022
this is a easy breaker by golang code

tfgo-breaker 1. Intro This is a easy breaker by golang code. U can use it in your project quickly. Support function break, timeout, auto dry-run. 2. D

Sep 17, 2022
gobreaker implements the Circuit Breaker pattern in Go.

gobreaker gobreaker implements the Circuit Breaker pattern in Go.

Jan 7, 2023
Goya circuit is a circuit breaker mechanism implementation in microservices.

Goya-Circuit: 类似于Hystrix的熔断器实现 Goya circuit is a circuit breaker mechanism implementation in microservices. It can prevent the whole link avalanche ca

Mar 8, 2022
🚦 Semaphore pattern implementation with timeout of lock/unlock operations.
🚦 Semaphore pattern implementation with timeout of lock/unlock operations.

?? semaphore Semaphore pattern implementation with timeout of lock/unlock operations. ?? Idea The semaphore provides API to control access to a shared

Dec 7, 2022