lang

package
v0.0.0-...-4638b96 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package lang chooses a language runtime for expressions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Compiler

type Compiler interface {
	// Compile creates a compiled expression from a string expression
	Compile(expr string) (compiled.Expression, v1beta1.ValueType, error)
}

Compiler creates a compiled expression from a string expression

func NewBuilder

func NewBuilder(finder ast.AttributeDescriptorFinder, mode LanguageRuntime) Compiler

NewBuilder returns an expression builder

type LanguageRuntime

type LanguageRuntime int

LanguageRuntime enumerates the expression languages supported by istio

const (
	// CEXL is legacy istio expression language
	CEXL LanguageRuntime = iota

	// LanguageRuntimeAnnotation on config resources to select a language runtime
	LanguageRuntimeAnnotation = "policy.istio.io/lang"
)

func GetLanguageRuntime

func GetLanguageRuntime(annotations map[string]string) LanguageRuntime

GetLanguageRuntime reads an override from a resource annotation

func (LanguageRuntime) String

func (mode LanguageRuntime) String() string

Jump to

Keyboard shortcuts

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