expert

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2026 License: Apache-2.0 Imports: 6 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package expert is the handle-based graph layer deliberately kept off the goav grammar: Graph(runtime) wires caller-provided pipeline Sources, Stages, and Sinks into a goav Task through explicit routes — for compositions the Stream grammar cannot express. Graph handles also anchor runtime Outputs: task.Attach(ctx, task.Route(node.Out().Route()).To(sink)). Most applications should start with input.Video() or input.Audio() and never need this package.

Index

Constants

This section is empty.

Variables

View Source
var ErrRuntimeRequired = errors.New("expert: graph requires goav runtime")

ErrRuntimeRequired reports attempts to use expert graph wiring without a runtime created by goav.New, bundle.New, or bundle.MustNew.

Functions

This section is empty.

Types

type GraphBuilder

type GraphBuilder interface {
	// Source adds a source node under the given name (the source's own name
	// when empty) and returns its handle.
	Source(string, pipeline.Source) GraphNode
	// Stage adds a stage node and returns its handle.
	Stage(string, pipeline.Stage) GraphNode
	// Sink adds a sink node and returns its handle.
	Sink(string, pipeline.Sink) GraphNode
	// Connect routes one outlet to the given inlets.
	Connect(GraphOutlet, ...GraphInlet) GraphBuilder
	// Describe reports the wired graph spec, or the first wiring error.
	Describe() (pipeline.Spec, error)
	// Build compiles the wired graph into a runnable goav live task.
	Build(context.Context) (goav.Task, error)
}

GraphBuilder is the handle-based expert graph builder: named nodes wired by explicit Connect routes, described and built like any goav task.

func Graph

func Graph(runtime *goav.Runtime) GraphBuilder

Graph opens the handle-based graph builder on a goav runtime.

type GraphInlet

type GraphInlet struct {
	// contains filtered or unexported fields
}

GraphInlet is the receiving end of a Connect route.

type GraphNode

type GraphNode struct {
	// contains filtered or unexported fields
}

GraphNode is an expert-graph handle to one added source, stage, or sink; its outlets and inlets wire Connect routes, and its Route anchors runtime Outputs through task.Route.

func (GraphNode) Event

func (n GraphNode) Event(event av.EventType) GraphOutlet

Event returns an outlet routing only the given event type.

func (GraphNode) In

func (n GraphNode) In() GraphInlet

In returns the node's inlet for Connect.

func (GraphNode) Name

func (n GraphNode) Name() string

Name returns the node's graph-unique name.

func (GraphNode) Out

func (n GraphNode) Out() GraphOutlet

Out returns an outlet routing every message the node emits.

func (GraphNode) Route

func (n GraphNode) Route() pipeline.Route

Route reports the route the handle anchors for task.Route: every message the node emits.

func (GraphNode) Stream

func (n GraphNode) Stream(stream av.StreamID) GraphOutlet

Stream returns an outlet routing only the given stream's messages.

type GraphOutlet

type GraphOutlet struct {
	// contains filtered or unexported fields
}

GraphOutlet selects which messages leave a node on a route: everything (Out), one stream (Stream), or one event type (Event).

func (GraphOutlet) Name

func (o GraphOutlet) Name() string

Name returns the name of the node the outlet routes from.

func (GraphOutlet) Route

func (o GraphOutlet) Route() pipeline.Route

Route reports the route the outlet anchors for task.Route: the node plus the outlet's stream or event narrowing.

Jump to

Keyboard shortcuts

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