Skip to content
This repository was archived by the owner on Jul 29, 2025. It is now read-only.

Commit 4a5eac5

Browse files
Gal Toppergkirok
authored andcommitted
Vendorize v3io-tsdb (#15)
* Vendorize v3io-go-http
1 parent 634f944 commit 4a5eac5

File tree

1,814 files changed

+189936
-3
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,814 files changed

+189936
-3
lines changed

functions/ingest/ingest.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"encoding/json"
55
"os"
66
"sort"
7+
"strings"
78
"sync"
89

910
"github.com/nuclio/nuclio-sdk-go"
@@ -43,8 +44,8 @@ type value struct {
4344
}
4445

4546
type sample struct {
46-
Time string `json:"t,omitempty"`
47-
Value value `json:"v,omitempty"`
47+
Time string `json:"t"`
48+
Value value `json:"v"`
4849
}
4950

5051
type request struct {
@@ -68,6 +69,10 @@ func Ingest(context *nuclio.Context, event nuclio.Event) (interface{}, error) {
6869
return "", nuclio.WrapErrBadRequest(err)
6970
}
7071

72+
if strings.TrimSpace(request.Metric) == "" {
73+
return nil, nuclio.WrapErrBadRequest(errors.New(`request is missing the mandatory 'metric' field`))
74+
}
75+
7176
// convert the map[string]string -> []Labels
7277
labels := getLabelsFromRequest(request.Metric, request.Labels)
7378

functions/ingest/vendor/github.com/v3io/v3io-go-http/LICENSE

Lines changed: 201 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

functions/ingest/vendor/github.com/v3io/v3io-go-http/README.md

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

functions/ingest/vendor/github.com/v3io/v3io-go-http/container.go

Lines changed: 144 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)