eventpipe

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 eventpipe provides a simple eventqueue.Queue implementation which is used to connect [a2asrv.AgentExecutor] with event processor. Events get to the real eventqueue only after they were successfully processed and applied to the [a2asrv.TaskStore].

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Local

type Local struct {
	Reader Reader
	Writer Writer
	// contains filtered or unexported fields
}

Local represents a local event pipe with a reader and a writer.

func NewLocal

func NewLocal(opts ...LocalPipeOption) *Local

NewLocal creates a new local event pipe.

func (*Local) Close

func (q *Local) Close()

Close closes the local event pipe.

type LocalPipeOption

type LocalPipeOption func(*localOptions)

LocalPipeOption is a functional option for configuring a local pipe.

func WithBufferSize

func WithBufferSize(size int) LocalPipeOption

WithBufferSize configures the size of the event buffer for the local pipe.

type Reader added in v0.3.4

type Reader interface {
	// Read dequeues an event or blocks if the queue is empty.
	Read(ctx context.Context) (a2a.Event, error)
}

Reader is an interface for reading events.

type Writer

type Writer interface {
	// Write enqueues an event or blocks if the queue is full.
	Write(ctx context.Context, event a2a.Event) error
}

Writer is an interface for writing events.

Jump to

Keyboard shortcuts

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