taskupdate

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: 8 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

func IsFinal added in v0.3.3

func IsFinal(event a2a.Event) bool

IsFinal returns true if event must terminate a valid execution event sequence.

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 taskstore.Store to store the new state.

func NewManager

func NewManager(store taskstore.Store, info a2a.TaskInfo, task *taskstore.StoredTask) *Manager

NewManager is a Manager constructor function.

func (*Manager) Process

func (mgr *Manager) Process(ctx context.Context, event a2a.Event) (*taskstore.StoredTask, 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, event a2a.Event, cause error) (*taskstore.StoredTask, error)

SetTaskFailed attempts to move the Task to failed state and returns it in case of a success.

Jump to

Keyboard shortcuts

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