package spec
import "github.com/influxdata/flux/internal/spec"
Index ¶
- func FromEvaluation(ctx context.Context, ses []interpreter.SideEffect, now time.Time, skipYields bool) (*operation.Spec, error)
- func FromScript(ctx context.Context, runtime flux.Runtime, now time.Time, script string) (*operation.Spec, error)
- func FromTableObject(ctx context.Context, to *flux.TableObject, now time.Time) (*operation.Spec, error)
Functions ¶
func FromEvaluation ¶
func FromEvaluation(ctx context.Context, ses []interpreter.SideEffect, now time.Time, skipYields bool) (*operation.Spec, error)
FromEvaluation produces a flux.Spec from an array of side-effects.
The `skipYields` param can be used to adjust the spec (ie to omit the yields). This is useful for situations like table functions (tableFind, etc) where the consumer of the spec can only accept one (1) result, presumably coming from the terminal node in the plan. In keeping with the "one result" requirement, when `skipYields` is true FromEvaluation will produce an error for inputs producing > 1 result.
func FromScript ¶
func FromScript(ctx context.Context, runtime flux.Runtime, now time.Time, script string) (*operation.Spec, error)
FromScript returns a spec from a script expressed as a raw string. This is duplicate logic for what happens when a flux.Program runs. This function is used in tests that compare flux.Specs (e.g. in planner tests).
func FromTableObject ¶
func FromTableObject(ctx context.Context, to *flux.TableObject, now time.Time) (*operation.Spec, error)
FromTableObject returns a spec from a TableObject.
Source Files ¶
- Version
- v0.196.1 (latest)
- Published
- Feb 19, 2025
- Platform
- linux/amd64
- Imports
- 11 packages
- Last checked
- 1 day ago –
Tools for package owners.