2020-11-06 00:54:28 +00:00
|
|
|
// This package imports all the influxdb-specific query builtins. From influxdb
|
|
|
|
// we must use this package and not the init package provided by flux.
|
|
|
|
//
|
|
|
|
// This package is used for initializing with a function call. As a
|
|
|
|
// convenience, the fluxinit/static package can be imported for use cases where
|
|
|
|
// static initialization is okay, such as tests.
|
2020-11-03 21:07:41 +00:00
|
|
|
package fluxinit
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/influxdata/flux/runtime"
|
|
|
|
|
|
|
|
_ "github.com/influxdata/flux/stdlib"
|
|
|
|
_ "github.com/influxdata/influxdb/v2/query/stdlib" // Import the stdlib
|
|
|
|
)
|
|
|
|
|
2020-11-06 00:54:28 +00:00
|
|
|
// The FluxInit() function prepares the runtime for compilation and execution
|
|
|
|
// of Flux. This is a costly step and should only be performed if the intention
|
|
|
|
// is to compile and execute flux code.
|
2020-11-03 21:07:41 +00:00
|
|
|
func FluxInit() {
|
|
|
|
runtime.FinalizeBuiltIns()
|
|
|
|
}
|