Help us shape the future of Go! Take the 2026 Go Developer Survey

client

package
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package client wraps the official A2A client with the gateway's fixed JSON-RPC-only transport policy.

Index

Constants

View Source
const (
	MaxBodyBytes   int64 = 4 << 20
	MaxEventBytes  int64 = 1 << 20
	MaxStreamBytes int64 = 64 << 20
	IdleTimeout          = 60 * time.Second
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, iface a2a.AgentInterface, httpClient *http.Client) (*Client, error)

func (*Client) CancelTask

func (c *Client) CancelTask(ctx context.Context, req *a2a.CancelTaskRequest) (*a2a.Task, error)

func (*Client) Close

func (c *Client) Close() error

func (*Client) SendMessage

func (c *Client) SendMessage(ctx context.Context, req *a2a.SendMessageRequest) (a2a.SendMessageResult, error)

func (*Client) SendStreamingMessage

func (c *Client) SendStreamingMessage(ctx context.Context, req *a2a.SendMessageRequest) iter.Seq2[a2a.Event, error]

type ResponseError

type ResponseError struct {
	StatusCode int
}

func (*ResponseError) Error

func (e *ResponseError) Error() string

Jump to

Keyboard shortcuts

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