taskupdate

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package taskupdate provides types and utilities for performing a2a.Task updates in response to a2a.Event-s.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

Manager is used for processing a2a.Event related to an a2a.Task. It updates the Task accordingly and uses Saver to store the new state.

func NewManager

func NewManager(saver Saver, task *a2a.Task) *Manager

NewManager is a Manager constructor function.

func (*Manager) Process

func (mgr *Manager) Process(ctx context.Context, event a2a.Event) (*a2a.Task, error)

Process validates the event associated with the managed a2a.Task and integrates the new state into it.

func (*Manager) SetTaskFailed

func (mgr *Manager) SetTaskFailed(ctx context.Context, cause error)

type Saver

type Saver interface {
	Save(ctx context.Context, task *a2a.Task) error
}

Saver is used for saving the a2a.Task after updating its state.

Jump to

Keyboard shortcuts

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