directives

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package directives holds the DSL directive registry and the shipped directives themselves.

The shared types and helpers live in the `core` subpackage so that future directives can be moved into their own folders without creating an import cycle. This file re-exports everything existing directive implementations refer to, so no caller changes when a directive moves.

Index

Constants

View Source
const StatsDeclarationKey = "stats_collectors"

Variables

This section is empty.

Functions

func AtErr

func AtErr(ctx *Context, line int, name, msg string) error

func AtErrf

func AtErrf(ctx *Context, line int, name, format string, args ...any) error

func Names

func Names() []string

func ParseFloat

func ParseFloat(s string) (float64, error)

func ParseInt

func ParseInt(s string) (int, error)

func ParseList

func ParseList(s string) []string

func Register

func Register(d Directive)

Function re-exports.

func SplitBlock

func SplitBlock(lines []string, start int) (header string, body []string, next int, err error)

func SplitNameAndAttrs

func SplitNameAndAttrs(s string) (string, map[string]string, error)

func StripDirectivePrefix

func StripDirectivePrefix(line, name string) (string, bool)

func TrimQuotes

func TrimQuotes(s string) string

Types

type ActionMeta

type ActionMeta = core.ActionMeta

Type aliases. Code in this package keeps using the bare names.

type AssertDecl

type AssertDecl = core.AssertDecl

Type aliases. Code in this package keeps using the bare names.

type CapabilityEnvelope

type CapabilityEnvelope = core.CapabilityEnvelope

Type aliases. Code in this package keeps using the bare names.

type ConfigFieldSpec

type ConfigFieldSpec struct {
	Pos        Position
	Key        string
	Default    string
	CLI        string
	Desc       string
	Positional int
}

ConfigFieldSpec holds metadata for a field declared inside @config { ... }.

type Context

type Context = core.Context

Type aliases. Code in this package keeps using the bare names.

type Directive

type Directive = core.Directive

Type aliases. Code in this package keeps using the bare names.

func All

func All() []Directive

func Lookup

func Lookup(line string) (Directive, bool)

type GateRule

type GateRule = core.GateRule

Type aliases. Code in this package keeps using the bare names.

type OnErrorDecl

type OnErrorDecl = core.OnErrorDecl

Type aliases. Code in this package keeps using the bare names.

type OnErrorRule

type OnErrorRule = core.OnErrorRule

Type aliases. Code in this package keeps using the bare names.

type Pipeline

type Pipeline = core.Pipeline

Type aliases. Code in this package keeps using the bare names.

type Pool

type Pool = core.Pool

Type aliases. Code in this package keeps using the bare names.

type Position

type Position = core.Position

Type aliases. Code in this package keeps using the bare names.

type Preprocessed

type Preprocessed = core.Preprocessed

Type aliases. Code in this package keeps using the bare names.

type Requirement

type Requirement = core.Requirement

Type aliases. Code in this package keeps using the bare names.

Directories

Path Synopsis
Package builtin holds the shipped directives, one subdirectory per directive.
Package builtin holds the shipped directives, one subdirectory per directive.
at_on
file: flow/directives/builtin/at_on/on.go
file: flow/directives/builtin/at_on/on.go
Package core holds the domain-agnostic parts of the directives system.
Package core holds the domain-agnostic parts of the directives system.

Jump to

Keyboard shortcuts

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