repl

package
v0.173.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2022 License: MIT Imports: 23 Imported by: 7

Documentation

Overview

Package repl implements the read-eval-print-loop for the command line flux query console.

Index

Constants

View Source
const CompilerType = "REPL"

CompilerType specific to the Flux REPL

Variables

This section is empty.

Functions

func AddCompilerToMappings added in v0.26.0

func AddCompilerToMappings(mappings flux.CompilerMappings) error

func LoadQuery

func LoadQuery(q string) (string, error)

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 added in v0.26.0

type Compiler struct {
	Spec *flux.Spec `json:"spec"`
}

Compiler specific to the Flux REPL

func (Compiler) Compile added in v0.26.0

func (c Compiler) Compile(ctx context.Context, runtime flux.Runtime) (flux.Program, error)

func (Compiler) CompilerType added in v0.26.0

func (c Compiler) CompilerType() flux.CompilerType

type Option added in v0.172.0

type Option interface {
	// contains filtered or unexported methods
}

func EnableSuggestions added in v0.172.0

func EnableSuggestions() Option

type REPL

type REPL struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, opts ...Option) *REPL

func (*REPL) Eval added in v0.68.0

func (r *REPL) Eval(t string) ([]interpreter.SideEffect, error)

func (*REPL) Input

func (r *REPL) Input(t string) (*libflux.FluxError, error)

func (*REPL) Run

func (r *REPL) Run()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL