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 // CEL is Common Expression Language (https://github.com/google/cel-spec) CEL // COMPAT is a hybrid with CEXL syntax but CEL semantics COMPAT // 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
type TypeChecker ¶
type TypeChecker = checker.TypeChecker
TypeChecker interface (bound to legacy one)
func NewTypeChecker ¶
func NewTypeChecker(finder ast.AttributeDescriptorFinder, mode LanguageRuntime) TypeChecker
NewTypeChecker returns a type checker
Click to show internal directories.
Click to hide internal directories.