Documentation
¶
Index ¶
- func NewTaskTracker() domain.TaskTracker
- func WriteViperConfigWithIndent(v *viper.Viper, indent int) error
- type Agent
- type AgentContext
- type TaskTrackerImpl
- func (t *TaskTrackerImpl) AddTask(contextID, taskID string)
- func (t *TaskTrackerImpl) ClearAllAgents()
- func (t *TaskTrackerImpl) GetAgentForContext(contextID string) string
- func (t *TaskTrackerImpl) GetAllAgents() []string
- func (t *TaskTrackerImpl) GetAllContexts() []string
- func (t *TaskTrackerImpl) GetAllPollingTasks() []string
- func (t *TaskTrackerImpl) GetContextForTask(taskID string) string
- func (t *TaskTrackerImpl) GetContextsForAgent(agentURL string) []string
- func (t *TaskTrackerImpl) GetLatestContextForAgent(agentURL string) string
- func (t *TaskTrackerImpl) GetLatestTaskForContext(contextID string) string
- func (t *TaskTrackerImpl) GetPollingState(taskID string) *domain.TaskPollingState
- func (t *TaskTrackerImpl) GetPollingTasksForContext(contextID string) []string
- func (t *TaskTrackerImpl) GetTasksForContext(contextID string) []string
- func (t *TaskTrackerImpl) HasContext(contextID string) bool
- func (t *TaskTrackerImpl) HasTask(taskID string) bool
- func (t *TaskTrackerImpl) IsPolling(taskID string) bool
- func (t *TaskTrackerImpl) RegisterContext(agentURL, contextID string)
- func (t *TaskTrackerImpl) RemoveContext(contextID string)
- func (t *TaskTrackerImpl) RemoveTask(taskID string)
- func (t *TaskTrackerImpl) StartPolling(taskID string, state *domain.TaskPollingState)
- func (t *TaskTrackerImpl) StopPolling(taskID string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTaskTracker ¶ added in v0.53.0
func NewTaskTracker() domain.TaskTracker
NewTaskTracker creates a new TaskTrackerImpl
Types ¶
type Agent ¶ added in v0.53.0
type Agent struct {
AgentURL string
Contexts []*AgentContext
}
Agent represents an A2A agent with its contexts
type AgentContext ¶ added in v0.53.0
type AgentContext struct {
ContextID string
Tasks []*domain.TaskPollingState
}
AgentContext represents a context within an agent with its tasks
type TaskTrackerImpl ¶ added in v0.53.0
type TaskTrackerImpl struct {
// contains filtered or unexported fields
}
TaskTrackerImpl provides a hierarchical implementation of TaskTracker
func (*TaskTrackerImpl) AddTask ¶ added in v0.53.0
func (t *TaskTrackerImpl) AddTask(contextID, taskID string)
AddTask adds a server-generated task ID to a context
func (*TaskTrackerImpl) ClearAllAgents ¶ added in v0.53.0
func (t *TaskTrackerImpl) ClearAllAgents()
ClearAllAgents clears all tracked agents, contexts, tasks, and polling states
func (*TaskTrackerImpl) GetAgentForContext ¶ added in v0.53.0
func (t *TaskTrackerImpl) GetAgentForContext(contextID string) string
GetAgentForContext returns the agent URL for a given context ID
func (*TaskTrackerImpl) GetAllAgents ¶ added in v0.53.0
func (t *TaskTrackerImpl) GetAllAgents() []string
GetAllAgents returns all agent URLs being tracked
func (*TaskTrackerImpl) GetAllContexts ¶ added in v0.53.0
func (t *TaskTrackerImpl) GetAllContexts() []string
GetAllContexts returns all context IDs being tracked
func (*TaskTrackerImpl) GetAllPollingTasks ¶ added in v0.53.0
func (t *TaskTrackerImpl) GetAllPollingTasks() []string
GetAllPollingTasks returns all task IDs that are currently being polled
func (*TaskTrackerImpl) GetContextForTask ¶ added in v0.53.0
func (t *TaskTrackerImpl) GetContextForTask(taskID string) string
GetContextForTask returns the context ID for a given task
func (*TaskTrackerImpl) GetContextsForAgent ¶ added in v0.53.0
func (t *TaskTrackerImpl) GetContextsForAgent(agentURL string) []string
GetContextsForAgent returns all context IDs for a specific agent
func (*TaskTrackerImpl) GetLatestContextForAgent ¶ added in v0.53.0
func (t *TaskTrackerImpl) GetLatestContextForAgent(agentURL string) string
GetLatestContextForAgent returns the most recently registered context for an agent
func (*TaskTrackerImpl) GetLatestTaskForContext ¶ added in v0.53.0
func (t *TaskTrackerImpl) GetLatestTaskForContext(contextID string) string
GetLatestTaskForContext returns the most recently added task for a context
func (*TaskTrackerImpl) GetPollingState ¶ added in v0.53.0
func (t *TaskTrackerImpl) GetPollingState(taskID string) *domain.TaskPollingState
GetPollingState returns the current polling state for a task
func (*TaskTrackerImpl) GetPollingTasksForContext ¶ added in v0.53.0
func (t *TaskTrackerImpl) GetPollingTasksForContext(contextID string) []string
GetPollingTasksForContext returns all task IDs that are currently being polled for a context
func (*TaskTrackerImpl) GetTasksForContext ¶ added in v0.53.0
func (t *TaskTrackerImpl) GetTasksForContext(contextID string) []string
GetTasksForContext returns all task IDs for a specific context
func (*TaskTrackerImpl) HasContext ¶ added in v0.53.0
func (t *TaskTrackerImpl) HasContext(contextID string) bool
HasContext checks if a context ID is registered
func (*TaskTrackerImpl) HasTask ¶ added in v0.53.0
func (t *TaskTrackerImpl) HasTask(taskID string) bool
HasTask checks if a task ID exists
func (*TaskTrackerImpl) IsPolling ¶ added in v0.53.0
func (t *TaskTrackerImpl) IsPolling(taskID string) bool
IsPolling returns whether a task currently has an active polling operation
func (*TaskTrackerImpl) RegisterContext ¶ added in v0.53.0
func (t *TaskTrackerImpl) RegisterContext(agentURL, contextID string)
RegisterContext registers a server-generated context ID for an agent
func (*TaskTrackerImpl) RemoveContext ¶ added in v0.53.0
func (t *TaskTrackerImpl) RemoveContext(contextID string)
RemoveContext removes a context and all its tasks
func (*TaskTrackerImpl) RemoveTask ¶ added in v0.53.0
func (t *TaskTrackerImpl) RemoveTask(taskID string)
RemoveTask removes a task from its context
func (*TaskTrackerImpl) StartPolling ¶ added in v0.53.0
func (t *TaskTrackerImpl) StartPolling(taskID string, state *domain.TaskPollingState)
StartPolling starts tracking a background polling operation for a task
func (*TaskTrackerImpl) StopPolling ¶ added in v0.53.0
func (t *TaskTrackerImpl) StopPolling(taskID string)
StopPolling stops and clears the polling state for a task