Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

startTimestamp & endTimestamp sometimes returned as int64 causing interface conversion error #4

Closed
hartfordfive opened this issue Nov 14, 2016 · 0 comments
Labels
Milestone

Comments

@hartfordfive
Copy link
Owner

For example, in some cases, the "cache" object is found to have startTimestamp and endTimestamp as int64 values instead of float64, which causes a panic :

  "cache": {
    "bckType": "byc",
    "cacheExternalIp": "172.68.65.143",
    "cacheExternalPort": 14949,
    "cacheFileKey": null,
    "cacheInternalIp": "10.16.10.140",
    "cacheServerName": "16c21",
    "cacheStatus": "unknown",
    "cacheTokens": 0,
    "endTimestamp": 1479096904397,
    "startTimestamp": 1479096904198
  }

Resulting panic:

goroutine 1 [running]:
panic(0x5b9980, 0xc4204aee40)
	/usr/local/Cellar/go/1.7.1/libexec/src/runtime/panic.go:500 +0x1a1
github.com/hartfordfive/cloudflarebeat/cloudflare.(*CloudflareClient).doRequest(0xc420330320, 0x6726e4, 0x18, 0xc420626180, 0xc420531b40, 0xe4cb, 0x990a90, 0xc4204b0048, 0xc420531bb8)
	/usr/local/go/src/github.com/hartfordfive/cloudflarebeat/cloudflare/client.go:163 +0x1265
github.com/hartfordfive/cloudflarebeat/cloudflare.(*CloudflareClient).GetLogRangeFromTimestamp(0xc420330320, 0xc420626180, 0xc420531c38, 0xc420531c28, 0xc4204b0048, 0x0, 0x0)
	/usr/local/go/src/github.com/hartfordfive/cloudflarebeat/cloudflare/client.go:201 +0x4a
github.com/hartfordfive/cloudflarebeat/beater.(*Cloudflarebeat).Run(0xc420226210, 0xc4201e4000, 0xc4201e40a8, 0xb)
	/usr/local/go/src/github.com/hartfordfive/cloudflarebeat/beater/cloudflarebeat.go:103 +0x654
github.com/hartfordfive/cloudflarebeat/vendor/github.com/elastic/beats/libbeat/beat.(*Beat).launch(0xc4201e4000, 0x6b5bf0, 0x0, 0x0)
	/usr/local/go/src/github.com/hartfordfive/cloudflarebeat/vendor/github.com/elastic/beats/libbeat/beat/beat.go:208 +0x687
github.com/hartfordfive/cloudflarebeat/vendor/github.com/elastic/beats/libbeat/beat.Run(0x66ace4, 0xe, 0x0, 0x0, 0x6b5bf0, 0xe99ce, 0xc4200001a0)
	/usr/local/go/src/github.com/hartfordfive/cloudflarebeat/vendor/github.com/elastic/beats/libbeat/beat/beat.go:133 +0x65
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant