Documentation
¶
Index ¶
Constants ¶
View Source
const ( Version = "2.0" // HTTP headers ContentJSON = "application/json" // JSON-RPC method names per A2A spec §7 MethodMessageSend = "message/send" MethodMessageStream = "message/stream" MethodTasksGet = "tasks/get" MethodTasksCancel = "tasks/cancel" MethodTasksResubscribe = "tasks/resubscribe" MethodPushConfigGet = "tasks/pushNotificationConfig/get" MethodPushConfigSet = "tasks/pushNotificationConfig/set" MethodPushConfigList = "tasks/pushNotificationConfig/list" MethodPushConfigDelete = "tasks/pushNotificationConfig/delete" MethodGetExtendedAgentCard = "agent/getAuthenticatedExtendedCard" )
JSON-RPC 2.0 protocol constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
type Error struct {
Code int `json:"code"`
Message string `json:"message"`
Data map[string]any `json:"data,omitempty"`
}
jsonrpcError represents a JSON-RPC 2.0 error object. TODO(yarolegovich): Convert to transport-agnostic error format so Client can use errors.Is(err, a2a.ErrMethodNotFound). This needs to be implemented across all transports (currently not in grpc either).
func ToJSONRPCError ¶
func (*Error) ToA2AError ¶
Click to show internal directories.
Click to hide internal directories.