Documentation
¶
Index ¶
- func NewShellTracker(maxConcurrent int) domain.ShellTracker
- func NewTaskTracker() domain.TaskTracker
- func WriteViperConfigWithIndent(v *viper.Viper, indent int) error
- type Agent
- type AgentContext
- type OutputRingBuffer
- func (rb *OutputRingBuffer) Clear()
- func (rb *OutputRingBuffer) MaxSize() int
- func (rb *OutputRingBuffer) ReadFrom(offset int64) (string, int64)
- func (rb *OutputRingBuffer) Recent(maxBytes int) string
- func (rb *OutputRingBuffer) Size() int
- func (rb *OutputRingBuffer) Stats() string
- func (rb *OutputRingBuffer) String() string
- func (rb *OutputRingBuffer) TotalWritten() int64
- func (rb *OutputRingBuffer) Write(p []byte) (n int, err error)
- 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 NewShellTracker ¶ added in v0.81.0
func NewShellTracker(maxConcurrent int) domain.ShellTracker
NewShellTracker creates a new shell tracker with the specified maximum concurrent shells.
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 OutputRingBuffer ¶ added in v0.81.0
type OutputRingBuffer struct {
// contains filtered or unexported fields
}
OutputRingBuffer is a thread-safe circular buffer that implements io.Writer. It provides bounded memory usage by overwriting oldest data when the buffer fills.
func NewOutputRingBuffer ¶ added in v0.81.0
func NewOutputRingBuffer(maxSize int) *OutputRingBuffer
NewOutputRingBuffer creates a new ring buffer with the specified maximum size in bytes.
func (*OutputRingBuffer) Clear ¶ added in v0.81.0
func (rb *OutputRingBuffer) Clear()
Clear resets the buffer to empty state.
func (*OutputRingBuffer) MaxSize ¶ added in v0.81.0
func (rb *OutputRingBuffer) MaxSize() int
MaxSize returns the maximum size of the buffer in bytes.
func (*OutputRingBuffer) ReadFrom ¶ added in v0.81.0
func (rb *OutputRingBuffer) ReadFrom(offset int64) (string, int64)
ReadFrom returns all data from the specified offset onwards. The offset is absolute (based on totalWritten), not relative to buffer position. Returns the data as a string and the new offset to use for the next read.
func (*OutputRingBuffer) Recent ¶ added in v0.81.0
func (rb *OutputRingBuffer) Recent(maxBytes int) string
Recent returns the most recent N bytes from the buffer. If maxBytes is larger than the buffer or total written, returns all available data.
func (*OutputRingBuffer) Size ¶ added in v0.81.0
func (rb *OutputRingBuffer) Size() int
Size returns the current size of the buffer in bytes.
func (*OutputRingBuffer) Stats ¶ added in v0.81.0
func (rb *OutputRingBuffer) Stats() string
Stats returns statistics about the buffer.
func (*OutputRingBuffer) String ¶ added in v0.81.0
func (rb *OutputRingBuffer) String() string
String returns the entire current buffer contents as a string. This respects the circular nature and returns data in the correct order.
func (*OutputRingBuffer) TotalWritten ¶ added in v0.81.0
func (rb *OutputRingBuffer) TotalWritten() int64
TotalWritten returns the total number of bytes written to the buffer.
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