dslparse

package
v0.6.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyConfigLine

func ApplyConfigLine(cfg *Config, line string)

ApplyConfigLine parses one @config: directive into cfg.

Types

type Config

type Config struct {
	Silent map[string]bool
	Strict bool
}

Config carries @config: directives collected during parse.

func ParseManifest

func ParseManifest(content string) (map[string]Modifiers, Config)

ParseManifest parses a full .flow manifest. Returns a map from action name to its modifiers, plus the accumulated @config: state.

type Modifiers

type Modifiers struct {
	CustomName  string
	Description string

	ReqType string
	ResType string

	Method string
	Path   string

	Transports []TransportBinding

	Timeout           time.Duration
	CacheTTL          time.Duration
	CacheKey          string
	RetryMax          int
	RetryPredicate    string
	BackoffStrategy   string
	BackoffBase       time.Duration
	BackoffMax        time.Duration
	Idempotent        bool
	IdempotencyHeader string
	RateLimit         string
	RateLimitRPS      float64
	RateLimitBurst    int
	ConcurrencyLimit  int32
	BreakerFailures   int
	BreakerCooldown   time.Duration
	Priority          string

	RequiresAuth bool
	Roles        []string
	Permissions  []string
	Features     []string

	Tags          []string
	Scope         string
	SuccessStatus int
	BudgetMicros  int64
	Audit         bool

	HITLPrompt   string
	HITLOptions  []string
	HITLTriggers []string

	Deprecated      bool
	DeprecatedSince string
	DeprecatedUse   string

	SSEChannel string
	CLIAliases []string
	CLIDesc    string
	A2ADesc    string
	A2AExample []string
}

Modifiers is the full parse output for a single action line in a .flow manifest. Analyzer consumes every field; the runtime overlay uses a subset.

type ParsedLine

type ParsedLine struct {
	RawName     string
	HeadAtom    string
	IsComposite bool
	Modifiers   Modifiers
}

ParsedLine is the per-line parse result: the pipeline head atom (if any), whether the line is a composite pipeline, and the parsed modifiers for the tail atom.

func ParseLine

func ParseLine(line string) (ParsedLine, bool)

ParseLine parses a single .flow line. Returns the raw atom name, the head atom (for composites), whether the line is a pipeline, and the parsed modifiers. Returns false when the line is empty or malformed.

type TransportBinding

type TransportBinding struct {
	Kind       string            `json:"kind"`
	Protocol   string            `json:"protocol,omitempty"`
	Target     string            `json:"target"`
	Method     string            `json:"method,omitempty"`
	Path       string            `json:"path,omitempty"`
	Subject    string            `json:"subject,omitempty"`
	QueueGroup string            `json:"queue_group,omitempty"`
	Aliases    []string          `json:"aliases,omitempty"`
	Interval   time.Duration     `json:"interval,omitempty"`
	Schedule   string            `json:"schedule,omitempty"`
	Stream     bool              `json:"stream,omitempty"`
	Raw        bool              `json:"raw,omitempty"`
	Meta       map[string]string `json:"meta,omitempty"`
}

TransportBinding mirrors the kernel-agnostic shape of a routing entry.

Jump to

Keyboard shortcuts

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