Skip to content

Commit

Permalink
Merge pull request #23 from v3io/development
Browse files Browse the repository at this point in the history
development --> Master (support access key)
  • Loading branch information
gshatz authored Jan 6, 2019
2 parents d6c1d96 + f68f5b6 commit b938335
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 69 deletions.
3 changes: 2 additions & 1 deletion functions/ingest/ingest.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ func createTSDBAppender(context *nuclio.Context, path string) (tsdb.Appender, er
}

v3ioUrl := os.Getenv("INGEST_V3IO_URL")
accessKey := os.Getenv("INGEST_V3IO_ACCESS_KEY")
username := os.Getenv("INGEST_V3IO_USERNAME")
password := os.Getenv("INGEST_V3IO_PASSWORD")
containerName := os.Getenv("INGEST_V3IO_CONTAINER")
Expand All @@ -87,7 +88,7 @@ func createTSDBAppender(context *nuclio.Context, path string) (tsdb.Appender, er
containerName = "bigdata"
}

container, err := tsdb.NewContainer(v3ioUrl, numWorkers, username, password, containerName, context.Logger)
container, err := tsdb.NewContainer(v3ioUrl, numWorkers, accessKey, username, password, containerName, context.Logger)
if err != nil {
return nil, errors.Wrap(err, "Failed to create container")
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions functions/query/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func Query(context *nuclio.Context, event nuclio.Event) (interface{}, error) {
}

params := &pquerier.SelectParams{
Name: request.Metric,
Name: request.Metric,
Functions: strings.Join(request.Aggregators, ","),
Step: step,
Filter: request.FilterExpression,
Expand Down Expand Up @@ -117,6 +117,7 @@ func createV3ioAdapter(context *nuclio.Context, path string) error {
}

v3ioUrl := os.Getenv("QUERY_V3IO_URL")
accessKey := os.Getenv("QUERY_V3IO_ACCESS_KEY")
username := os.Getenv("QUERY_V3IO_USERNAME")
password := os.Getenv("QUERY_V3IO_PASSWORD")
containerName := os.Getenv("QUERY_V3IO_CONTAINER")
Expand All @@ -129,7 +130,7 @@ func createV3ioAdapter(context *nuclio.Context, path string) error {
containerName = "bigdata"
}

container, err := tsdb.NewContainer(v3ioUrl, numWorkers, username, password, containerName, context.Logger)
container, err := tsdb.NewContainer(v3ioUrl, numWorkers, accessKey, username, password, containerName, context.Logger)
if err != nil {
return errors.Wrap(err, "Failed to create container")
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit b938335

Please sign in to comment.