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

stream: json message to frame #5

Merged
merged 8 commits into from
May 22, 2021
Merged

stream: json message to frame #5

merged 8 commits into from
May 22, 2021

Conversation

atifali
Copy link
Contributor

@atifali atifali commented May 22, 2021

This does two things:

  1. Matches the stream path with the message topic
  2. Introduces the ability to convert json messages to frames

@atifali atifali requested a review from ryantxu May 22, 2021 06:25

func TestJSONValuesMessage(t *testing.T) {
timestamp := time.Unix(1, 0)
values := []interface{}{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
values := []interface{}{
values := []float64{

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a way to explode the float64 array with Sprintf args? does not work with values..., since it expects []interface{}. Ideas?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

interesting! i just tried a few things -- nothing great, but looks like explicitly doing values[0], values[1], values[2]... is the best option

Copy link
Member

@ryantxu ryantxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@ryantxu ryantxu merged commit 30a3dee into main May 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants