Class: A2A::Server::Storage::Base
- Inherits:
-
Object
- Object
- A2A::Server::Storage::Base
- Defined in:
- lib/a2a/server/storage/base.rb
Instance Method Summary collapse
-
#clear_all_tasks ⇒ void
Clear all tasks (useful for testing).
-
#delete_push_notification_config(task_id, config_id) ⇒ Boolean
Delete a push notification config.
-
#delete_task(task_id) ⇒ Boolean
Delete a task by ID.
-
#get_push_notification_config_by_id(task_id, config_id) ⇒ A2A::Types::TaskPushNotificationConfig?
Get a push notification config by task and config ID.
-
#get_task(task_id) ⇒ A2A::Types::Task?
Get a task by ID.
-
#list_all_tasks ⇒ Array<A2A::Types::Task>
List all tasks.
-
#list_push_notification_configs(task_id) ⇒ Array<A2A::Types::TaskPushNotificationConfig>
List all push notification configs for a task.
-
#list_tasks(**filters) ⇒ Array<A2A::Types::Task>
List tasks with optional filtering.
-
#list_tasks_by_context(context_id) ⇒ Array<A2A::Types::Task>
List all tasks for a given context ID.
-
#save_push_notification_config(config) ⇒ void
Save a push notification config.
-
#save_task(task) ⇒ void
Save a task to storage.
-
#task_exists?(task_id) ⇒ Boolean
Check if a task exists.
Instance Method Details
#clear_all_tasks ⇒ void
This method returns an undefined value.
Clear all tasks (useful for testing)
93 94 95 |
# File 'lib/a2a/server/storage/base.rb', line 93 def clear_all_tasks raise NotImplementedError, "#{self.class} must implement #clear_all_tasks" end |
#delete_push_notification_config(task_id, config_id) ⇒ Boolean
Delete a push notification config
135 136 137 |
# File 'lib/a2a/server/storage/base.rb', line 135 def delete_push_notification_config(task_id, config_id) raise NotImplementedError, "#{self.class} must implement #delete_push_notification_config" end |
#delete_task(task_id) ⇒ Boolean
Delete a task by ID
46 47 48 |
# File 'lib/a2a/server/storage/base.rb', line 46 def delete_task(task_id) raise NotImplementedError, "#{self.class} must implement #delete_task" end |
#get_push_notification_config_by_id(task_id, config_id) ⇒ A2A::Types::TaskPushNotificationConfig?
Get a push notification config by task and config ID
114 115 116 |
# File 'lib/a2a/server/storage/base.rb', line 114 def get_push_notification_config_by_id(task_id, config_id) raise NotImplementedError, "#{self.class} must implement #get_push_notification_config_by_id" end |
#get_task(task_id) ⇒ A2A::Types::Task?
Get a task by ID
36 37 38 |
# File 'lib/a2a/server/storage/base.rb', line 36 def get_task(task_id) raise NotImplementedError, "#{self.class} must implement #get_task" end |
#list_all_tasks ⇒ Array<A2A::Types::Task>
List all tasks
65 66 67 |
# File 'lib/a2a/server/storage/base.rb', line 65 def list_all_tasks raise NotImplementedError, "#{self.class} must implement #list_all_tasks" end |
#list_push_notification_configs(task_id) ⇒ Array<A2A::Types::TaskPushNotificationConfig>
List all push notification configs for a task
124 125 126 |
# File 'lib/a2a/server/storage/base.rb', line 124 def list_push_notification_configs(task_id) raise NotImplementedError, "#{self.class} must implement #list_push_notification_configs" end |
#list_tasks(**filters) ⇒ Array<A2A::Types::Task>
List tasks with optional filtering
75 76 77 |
# File 'lib/a2a/server/storage/base.rb', line 75 def list_tasks(**filters) raise NotImplementedError, "#{self.class} must implement #list_tasks" end |
#list_tasks_by_context(context_id) ⇒ Array<A2A::Types::Task>
List all tasks for a given context ID
56 57 58 |
# File 'lib/a2a/server/storage/base.rb', line 56 def list_tasks_by_context(context_id) raise NotImplementedError, "#{self.class} must implement #list_tasks_by_context" end |
#save_push_notification_config(config) ⇒ void
This method returns an undefined value.
Save a push notification config
103 104 105 |
# File 'lib/a2a/server/storage/base.rb', line 103 def save_push_notification_config(config) raise NotImplementedError, "#{self.class} must implement #save_push_notification_config" end |
#save_task(task) ⇒ void
This method returns an undefined value.
Save a task to storage
26 27 28 |
# File 'lib/a2a/server/storage/base.rb', line 26 def save_task(task) raise NotImplementedError, "#{self.class} must implement #save_task" end |
#task_exists?(task_id) ⇒ Boolean
Check if a task exists
84 85 86 |
# File 'lib/a2a/server/storage/base.rb', line 84 def task_exists?(task_id) !get_task(task_id).nil? end |