Skip to content

Instantly share code, notes, and snippets.

View dcfranca's full-sized avatar

Daniel França dcfranca

View GitHub Profile
package main
import (
"bytes"
"context"
"database/sql"
"encoding/json"
"fmt"
"log"
"net/http"
import time
# CircuitBreaker implementation ################################
class CircuitOpenError(Exception):
pass
class CircuitBreaker:
def __init__(self, http_client, error_threshold, delay):

Keybase proof

I hereby claim:

  • I am dcfranca on github.
  • I am dcfranca (https://keybase.io/dcfranca) on keybase.
  • I have a public key ASD7bkrJXASbBoEhFID1HIv_SrVc8WxnOxB_MBtwsN6BSAo

To claim this, I am signing this object: