langrun

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Run

type Run interface {
	ID() RunID
	Cancel(context.Context, string) error
	Summary(context.Context) (*apilang.RunSummary, error)
	ReturnLoad(context.Context, map[string]*apivalues.Value, error, *apilang.RunSummary) error
	ReturnCall(context.Context, *apivalues.Value, error) error
	Discard(context.Context) error
}

type RunID

type RunID string

func NewRunID

func NewRunID() RunID

func (RunID) Child

func (r RunID) Child(n int) RunID

type Runs

type Runs interface {
	RunModule(
		_ context.Context,
		scope string,
		_ RunID,
		_ *apiprogram.Module,
		_ map[string]*apivalues.Value,
		_ SendFunc,
	) (Run, error)

	CallFunction(
		_ context.Context,
		_ RunID,
		fn *apivalues.Value,
		args []*apivalues.Value,
		kws map[string]*apivalues.Value,
		_ SendFunc,
	) (Run, error)

	Get(context.Context, RunID) (Run, error)

	List(context.Context) (map[string]map[RunID]bool, error)
}

type SendFunc

type SendFunc func(id RunID, t time.Time, from *apilang.RunState, to *apilang.RunState)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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