package repl
import "github.com/influxdata/flux/repl"
Package repl implements the read-eval-print-loop for the command line flux query console.
Index ¶
- Constants
- func AddCompilerToMappings(mappings flux.CompilerMappings) error
- func LoadQuery(q string) (string, error)
- type Compiler
- func (c Compiler) Compile(ctx context.Context, runtime flux.Runtime) (flux.Program, error)
- func (c Compiler) CompilerType() flux.CompilerType
- type Option
- type REPL
Constants ¶
const CompilerType = "REPL"
CompilerType specific to the Flux REPL
Functions ¶
func AddCompilerToMappings ¶
func AddCompilerToMappings(mappings flux.CompilerMappings) error
func LoadQuery ¶
LoadQuery returns the Flux query q, except for two special cases: if q is exactly "-", the query will be read from stdin; and if the first character of q is "@", the @ prefix is removed and the contents of the file specified by the rest of q are returned.
Types ¶
type Compiler ¶
Compiler specific to the Flux REPL
func (Compiler) Compile ¶
func (Compiler) CompilerType ¶
func (c Compiler) CompilerType() flux.CompilerType
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
func EnableSuggestions ¶
func EnableSuggestions() Option
type REPL ¶
type REPL struct {
// contains filtered or unexported fields
}
func New ¶
func (*REPL) Eval ¶
func (r *REPL) Eval(t string) ([]interpreter.SideEffect, error)
func (*REPL) Input ¶
func (*REPL) Run ¶
func (r *REPL) Run()
Source Files ¶
- Version
- v0.196.1 (latest)
- Published
- Feb 19, 2025
- Platform
- linux/amd64
- Imports
- 25 packages
- Last checked
- 1 day ago –
Tools for package owners.