Skip to content

Commit

Permalink
added support for any types in metadata labels field
Browse files Browse the repository at this point in the history
  • Loading branch information
sn0wyQ committed Jan 20, 2023
1 parent 6955fc9 commit cdf40aa
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions cmd/dev/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func getStreams() {
}

func findStreams() {
streams, err := streamRegistryClient.FindStreams(&proximaclient.StreamFilter{Labels: map[string]string{
streams, err := streamRegistryClient.FindStreams(&proximaclient.StreamFilter{Labels: map[string]any{
"encoding": "json",
}})
if err != nil {
Expand Down Expand Up @@ -131,10 +131,10 @@ func main() {
DebugHttpOutput: false,
})

// testStreamRegistryClient()
// testStreamDbClientFetch()
// testStreamDbClientStream()
// testStreamDbClientStreamWithBufferedReader()
//testStreamRegistryClient()
//testStreamDbClientFetch()
//testStreamDbClientStream()
//testStreamDbClientStreamWithBufferedReader()

t := time.Unix(time.Now().Unix()+10000, 0)
_, err := streamRegistryClient.FindOffset("proxima.eth-main.blocks.1_0", nil, &t)
Expand Down
2 changes: 1 addition & 1 deletion pkg/proximaclient/client_stream_registy_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type StreamRegistryClientOptions struct {
}

type StreamFilter struct {
Labels map[string]string `json:"labels"`
Labels map[string]any `json:"labels"`
}

func NewStreamRegistryClient(options StreamRegistryClientOptions) *StreamRegistryClient {
Expand Down
4 changes: 2 additions & 2 deletions pkg/proximaclient/model_stream_metadata.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package proximaclient

type StreamMetadata struct {
Description string `json:"description"`
Labels map[string]string `json:"labels"`
Description string `json:"description"`
Labels map[string]any `json:"labels"`
}

0 comments on commit cdf40aa

Please sign in to comment.