agent

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package agent provides multi-conduit orchestration for ore agent applications. An Agent coordinates multiple conduit.Conduit instances, running them concurrently with a shared session.Manager.

Use New to create an Agent, Add to register conduits, and Run to start all registered conduits. Run blocks until the context is cancelled or any conduit returns a non-nil error.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

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

Agent orchestrates multiple conduits with a shared session manager.

func New

func New(mgr *session.Manager) *Agent

New creates an Agent with the given session manager.

func (*Agent) Add

func (a *Agent) Add(c conduit.Conduit)

Add registers a conduit to be started by Run. Nil conduits are ignored.

func (*Agent) Run

func (a *Agent) Run(ctx context.Context) error

Run starts all registered conduits concurrently and blocks until ctx is cancelled or any conduit returns a non-nil error. When an error occurs, the context is cancelled to signal remaining conduits to shut down.

Jump to

Keyboard shortcuts

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