testexecutor

package
v1.0.0-alpha Latest Latest
Warning

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

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

Documentation

Overview

Package testexecutor provides mock implementations for agent executor for testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TestAgentExecutor

type TestAgentExecutor struct {
	Emitted   []a2a.Event
	ExecuteFn func(context.Context, *a2asrv.ExecutorContext) iter.Seq2[a2a.Event, error]
	CancelFn  func(context.Context, *a2asrv.ExecutorContext) iter.Seq2[a2a.Event, error]
}

TestAgentExecutor is a mock of a2asrv.AgentExecutor.

func FromEventGenerator

func FromEventGenerator(generator func(execCtx *a2asrv.ExecutorContext) []a2a.Event) *TestAgentExecutor

FromEventGenerator creates a TestAgentExecutor that emits events from a generator.

func FromFunction

FromFunction creates a TestAgentExecutor from a function.

func (*TestAgentExecutor) Cancel

Cancel implements a2asrv.AgentExecutor interface.

func (*TestAgentExecutor) Execute

Execute implements a2asrv.AgentExecutor interface.

Jump to

Keyboard shortcuts

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