parentmap

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToContext

func ToContext(ctx context.Context, parents Map) context.Context

Types

type Map

type Map map[string]agent.Agent

func FromContext

func FromContext(ctx context.Context) Map

func New

func New(root agent.Agent) (Map, error)

New creates parent map allowing to fetch agent's parent. It ensures that agent can have at most one parent. It ensures that the root node name is not referenced again in the agent tree

func (Map) RootAgent

func (m Map) RootAgent(cur agent.Agent) agent.Agent

RootAgent returns the root of the agent tree.

Jump to

Keyboard shortcuts

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