flow

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package flow runs a sequence of steps the model may name.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Definition

type Definition struct {
	Name  string `yaml:"name"`
	Steps []Step `yaml:"steps"`
}

func Parse

func Parse(data []byte) (*Definition, error)

type Runner

type Runner struct {
	Invoke func(ctx context.Context, operationID string, params map[string]string, approvalID string) (string, string, error)
}

func (*Runner) Run

func (r *Runner) Run(ctx context.Context, def *Definition, params map[string]string) ([]string, error)

type Step

type Step struct {
	Operation string `yaml:"operation"`
	Output    string `yaml:"output"` // copied onto the next step's parameter To
	To        string `yaml:"to"`
}

func (*Step) UnmarshalYAML

func (s *Step) UnmarshalYAML(value *yaml.Node) error

type StoppedError

type StoppedError struct {
	Status    string
	Operation string
}

func (StoppedError) Error

func (s StoppedError) Error() string

Jump to

Keyboard shortcuts

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