Skip to content

Commit

Permalink
Merge pull request #92 from maier/v3
Browse files Browse the repository at this point in the history
v3.0.0-beta
  • Loading branch information
maier authored Nov 28, 2018
2 parents f7368bd + 5b5296b commit 0c2bf02
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 11 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# v3.0.0-beta

* add: log deprecation notice on api calls
* upd: dependency circonusllhist v0.1.2, go-apiclient v0.5.3
* upd: `snapHistograms()` method to use the histogram `Copy()` if `resetHistograms` is false, otherwise uses `CopyAndReset()`

# v3.0.0-alpha.5

* add: allow any log package with a `Printf` to be used
Expand Down
20 changes: 12 additions & 8 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,14 @@ func New(ac *Config) (*API, error) {
}

a := &API{
apiURL: apiURL,
key: key,
app: app,
accountID: acctID,
caCert: ac.CACert,
tlsConfig: ac.TLSConfig,
Debug: ac.Debug,
Log: ac.Log,
apiURL: apiURL,
key: key,
app: app,
accountID: acctID,
caCert: ac.CACert,
tlsConfig: ac.TLSConfig,
Debug: ac.Debug,
Log: ac.Log,
useExponentialBackoff: false,
}

Expand All @@ -177,6 +177,8 @@ func New(ac *Config) (*API, error) {
a.Log = log.New(ioutil.Discard, "", log.LstdFlags)
}

a.Log.Printf("circonus-gometrics/api is DEPRECATED and will be removed - switch to github.com/circonus-labs/go-apiclient")

return a, nil
}

Expand Down Expand Up @@ -223,6 +225,8 @@ func backoff(interval uint) float64 {

// apiRequest manages retry strategy for exponential backoffs
func (a *API) apiRequest(reqMethod string, reqPath string, data []byte) ([]byte, error) {
a.Log.Printf("circonus-gometrics/api is DEPRECATED and will be removed - switch to github.com/circonus-labs/go-apiclient")

backoffs := []uint{2, 4, 8, 16, 32}
attempts := 0
success := false
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/circonus-labs/circonus-gometrics/v3

require (
github.com/circonus-labs/circonusllhist v0.1.3
github.com/circonus-labs/go-apiclient v0.5.2
github.com/circonus-labs/go-apiclient v0.5.3
github.com/hashicorp/go-retryablehttp v0.5.0
github.com/pkg/errors v0.8.0
github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
github.com/circonus-labs/circonusllhist v0.1.3 h1:TJH+oke8D16535+jHExHj4nQvzlZrj7ug5D7I/orNUA=
github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I=
github.com/circonus-labs/go-apiclient v0.5.2 h1:80zezxpOYzfQWJPQViqoCyv3mmMIHwE9MrxTHNxnNDc=
github.com/circonus-labs/go-apiclient v0.5.2/go.mod h1:624vxzSv6v6YnbEJ5o3xB2mjrqiPbSvyuo+s+nVabVo=
github.com/circonus-labs/go-apiclient v0.5.3 h1:xe0eJICrWwgjS2xz/nR1exS7DLbrGNLuvdvQFp2vcXA=
github.com/circonus-labs/go-apiclient v0.5.3/go.mod h1:624vxzSv6v6YnbEJ5o3xB2mjrqiPbSvyuo+s+nVabVo=
github.com/hashicorp/go-cleanhttp v0.5.0 h1:wvCrVc9TjDls6+YGAF2hAifE1E5U1+b4tH6KdvN3Gig=
github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
github.com/hashicorp/go-retryablehttp v0.5.0 h1:aVN0FYnPwAgZI/hVzqwfMiM86ttcHTlQKbBVeVmXPIs=
Expand Down

0 comments on commit 0c2bf02

Please sign in to comment.