Class: A2A::Plugin::TransportPlugin

Inherits:
Base
  • Object
show all
Defined in:
lib/a2a/plugin.rb

Overview

Transport plugin interface

Direct Known Subclasses

A2A::Plugins::ExampleTransport

Instance Attribute Summary

Attributes inherited from Base

#config, #logger

Instance Method Summary collapse

Methods inherited from Base

#cleanup, dependencies, depends_on, inherited, #initialize, plugin_type, #register_hooks

Constructor Details

This class inherits a constructor from A2A::Plugin::Base

Instance Method Details

#create_stream(**options) ⇒ Object

Create streaming connection (optional)

Parameters:

  • Connection options

Returns:

  • Stream connection

Raises:



277
278
279
# File 'lib/a2a/plugin.rb', line 277

def create_stream(**options)
  raise NotImplementedError, "Streaming not supported by this transport"
end

#send_request(request, **options) ⇒ Object

Send a request (must be implemented by subclasses)

Parameters:

  • Request data

  • Transport options

Returns:

  • Response

Raises:



264
265
266
# File 'lib/a2a/plugin.rb', line 264

def send_request(request, **options)
  raise NotImplementedError, "Transport plugins must implement #send_request"
end

#supports_streaming?Boolean

Check if transport supports streaming

Returns:



270
271
272
# File 'lib/a2a/plugin.rb', line 270

def supports_streaming?
  false
end