-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: need to draw in the influxdb-specific standard library in fluxinit
- Loading branch information
1 parent
bcb33ae
commit f67009c
Showing
5 changed files
with
24 additions
and
4 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
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,20 @@ | ||
package fluxinit | ||
|
||
import ( | ||
"github.com/influxdata/flux/runtime" | ||
|
||
_ "github.com/influxdata/flux/stdlib" | ||
_ "github.com/influxdata/influxdb/v2/query/stdlib" // Import the stdlib | ||
) | ||
|
||
// FluxInit() 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. | ||
// | ||
// Importing this package and calling FluxInit is equivalent to importing the | ||
// "builtin" package. It draws in the standard library functions, which | ||
// register themselves in init() functions, then performs the final steps | ||
// necessary to prepare for executing flux. | ||
func FluxInit() { | ||
runtime.FinalizeBuiltIns() | ||
} |