forked from influxdata/docs-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Flux 0.186.0 release notes * Flux 0.186.0 stdlib updates
- Loading branch information
Showing
14 changed files
with
415 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
title: dynamic.asArray() function | ||
description: > | ||
`dynamic.asArray()` converts a dynamic value into an array of dynamic elements. | ||
menu: | ||
flux_0_x_ref: | ||
name: dynamic.asArray | ||
parent: experimental/dynamic | ||
identifier: experimental/dynamic/asArray | ||
weight: 201 | ||
flux/v0.x/tags: [type-conversions] | ||
--- | ||
|
||
<!------------------------------------------------------------------------------ | ||
IMPORTANT: This page was generated from comments in the Flux source code. Any | ||
edits made directly to this page will be overwritten the next time the | ||
documentation is generated. | ||
To make updates to this documentation, update the function comments above the | ||
function definition in the Flux source code: | ||
https://github.com/influxdata/flux/blob/master/stdlib/experimental/dynamic/dynamic.flux#L27-L27 | ||
Contributing to Flux: https://github.com/influxdata/flux#contributing | ||
Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md | ||
-------------------------------------------------------------------------------> | ||
|
||
`dynamic.asArray()` converts a dynamic value into an array of dynamic elements. | ||
|
||
The dynamic input value must be an array. If it is not an array, `dynamic.asArray()` returns an error. | ||
|
||
##### Function type signature | ||
|
||
```js | ||
(<-v: dynamic) => [dynamic] | ||
``` | ||
|
||
{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}} | ||
|
||
## Parameters | ||
|
||
### v | ||
|
||
Dynamic value to convert. Default is the piped-forward value (`<-`). | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
--- | ||
title: dynamic.isType() function | ||
description: > | ||
`dynamic.isType()` tests if a dynamic type holds a value of a specified type. | ||
menu: | ||
flux_0_x_ref: | ||
name: dynamic.isType | ||
parent: experimental/dynamic | ||
identifier: experimental/dynamic/isType | ||
weight: 201 | ||
flux/v0.x/tags: [types, tests] | ||
introduced: 0.186.0 | ||
--- | ||
|
||
<!------------------------------------------------------------------------------ | ||
IMPORTANT: This page was generated from comments in the Flux source code. Any | ||
edits made directly to this page will be overwritten the next time the | ||
documentation is generated. | ||
To make updates to this documentation, update the function comments above the | ||
function definition in the Flux source code: | ||
https://github.com/influxdata/flux/blob/master/stdlib/experimental/dynamic/dynamic.flux#L81-L81 | ||
Contributing to Flux: https://github.com/influxdata/flux#contributing | ||
Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md | ||
-------------------------------------------------------------------------------> | ||
|
||
`dynamic.isType()` tests if a dynamic type holds a value of a specified type. | ||
|
||
|
||
|
||
##### Function type signature | ||
|
||
```js | ||
(type: string, v: dynamic) => bool | ||
``` | ||
|
||
{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}} | ||
|
||
## Parameters | ||
|
||
### v | ||
({{< req >}}) | ||
Value to test. | ||
|
||
|
||
|
||
### type | ||
({{< req >}}) | ||
String describing the type to check against. | ||
|
||
**Supported types**: | ||
- string | ||
- bytes | ||
- int | ||
- uint | ||
- float | ||
- bool | ||
- time | ||
- duration | ||
- regexp | ||
- array | ||
- object | ||
- function | ||
- dictionary | ||
- vector | ||
|
50 changes: 50 additions & 0 deletions
50
content/flux/v0.x/stdlib/experimental/dynamic/jsonencode.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
title: dynamic.jsonEncode() function | ||
description: > | ||
`dynamic.jsonEncode()` converts a dynamic value into JSON bytes. | ||
menu: | ||
flux_0_x_ref: | ||
name: dynamic.jsonEncode | ||
parent: experimental/dynamic | ||
identifier: experimental/dynamic/jsonEncode | ||
weight: 201 | ||
flux/v0.x/tags: [type-conversions] | ||
introduced: 0.186.0 | ||
--- | ||
|
||
<!------------------------------------------------------------------------------ | ||
IMPORTANT: This page was generated from comments in the Flux source code. Any | ||
edits made directly to this page will be overwritten the next time the | ||
documentation is generated. | ||
To make updates to this documentation, update the function comments above the | ||
function definition in the Flux source code: | ||
https://github.com/influxdata/flux/blob/master/stdlib/experimental/dynamic/dynamic.flux#L54-L54 | ||
Contributing to Flux: https://github.com/influxdata/flux#contributing | ||
Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md | ||
-------------------------------------------------------------------------------> | ||
|
||
`dynamic.jsonEncode()` converts a dynamic value into JSON bytes. | ||
|
||
|
||
|
||
##### Function type signature | ||
|
||
```js | ||
(v: dynamic) => bytes | ||
``` | ||
|
||
{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}} | ||
|
||
## Parameters | ||
|
||
### v | ||
({{< req >}}) | ||
Value to encode into JSON. | ||
|
||
|
||
|
51 changes: 51 additions & 0 deletions
51
content/flux/v0.x/stdlib/experimental/dynamic/jsonparse.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
title: dynamic.jsonParse() function | ||
description: > | ||
`dynamic.jsonParse()` takes JSON data as bytes and returns dynamic values. | ||
menu: | ||
flux_0_x_ref: | ||
name: dynamic.jsonParse | ||
parent: experimental/dynamic | ||
identifier: experimental/dynamic/jsonParse | ||
weight: 201 | ||
flux/v0.x/tags: [type-conversions] | ||
introduced: 0.186.0 | ||
--- | ||
|
||
<!------------------------------------------------------------------------------ | ||
IMPORTANT: This page was generated from comments in the Flux source code. Any | ||
edits made directly to this page will be overwritten the next time the | ||
documentation is generated. | ||
To make updates to this documentation, update the function comments above the | ||
function definition in the Flux source code: | ||
https://github.com/influxdata/flux/blob/master/stdlib/experimental/dynamic/dynamic.flux#L44-L44 | ||
Contributing to Flux: https://github.com/influxdata/flux#contributing | ||
Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md | ||
-------------------------------------------------------------------------------> | ||
|
||
`dynamic.jsonParse()` takes JSON data as bytes and returns dynamic values. | ||
|
||
JSON input is converted to dynamic-typed values which may be converted to | ||
a statically typed value with `dynamic.asArray()` or casting functions in the `dynamic` package. | ||
|
||
##### Function type signature | ||
|
||
```js | ||
(data: bytes) => dynamic | ||
``` | ||
|
||
{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}} | ||
|
||
## Parameters | ||
|
||
### data | ||
({{< req >}}) | ||
JSON data (as bytes) to parse. | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
title: iox.sql() function | ||
description: > | ||
`iox.sql()` executes an SQL query against a bucket in an IOx storage node. | ||
menu: | ||
flux_0_x_ref: | ||
name: iox.sql | ||
parent: experimental/iox | ||
identifier: experimental/iox/sql | ||
weight: 201 | ||
flux/v0.x/tags: [inputs] | ||
introduced: 0.186.0 | ||
--- | ||
|
||
<!------------------------------------------------------------------------------ | ||
IMPORTANT: This page was generated from comments in the Flux source code. Any | ||
edits made directly to this page will be overwritten the next time the | ||
documentation is generated. | ||
To make updates to this documentation, update the function comments above the | ||
function definition in the Flux source code: | ||
https://github.com/influxdata/flux/blob/master/stdlib/experimental/iox/iox.flux#L33-L33 | ||
Contributing to Flux: https://github.com/influxdata/flux#contributing | ||
Fluxdoc syntax: https://github.com/influxdata/flux/blob/master/docs/fluxdoc.md | ||
-------------------------------------------------------------------------------> | ||
|
||
`iox.sql()` executes an SQL query against a bucket in an IOx storage node. | ||
|
||
This function creates a source that reads data from IOx. | ||
|
||
##### Function type signature | ||
|
||
```js | ||
(bucket: string, query: string) => stream[A] where A: Record | ||
``` | ||
|
||
{{% caption %}}For more information, see [Function type signatures](/flux/v0.x/function-type-signatures/).{{% /caption %}} | ||
|
||
## Parameters | ||
|
||
### bucket | ||
({{< req >}}) | ||
IOx bucket to read data from. | ||
|
||
|
||
|
||
### query | ||
({{< req >}}) | ||
Query to execute. | ||
|
||
|
||
|
Oops, something went wrong.