a2agrpc

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Overview

Package a2agrpc provides an A2A gRPC service implementation which can be registered with grpc.Server. The implementation performs protobuf translation and delegates the actual method handling to a transport-agnostic a2asrv.RequestHandler.

grpcHandler := a2agrpc.NewHandler(requestHandler)

s := grpc.NewServer()
grpcHandler.RegisterWith(s)
if err := s.Serve(listener); err != nil && !errors.Is(err, grpc.ErrServerStopped) {
	log.Fatalf("Server exited with error: %v", err)
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	a2apb.UnimplementedA2AServiceServer
	// contains filtered or unexported fields
}

Handler implements protobuf translation layer and delegates the actual method handling to a2asrv.RequestHandler.

func NewHandler

func NewHandler(handler a2asrv.RequestHandler) *Handler

NewHandler is a Handler constructor function.

func (*Handler) CancelTask

func (h *Handler) CancelTask(ctx context.Context, req *a2apb.CancelTaskRequest) (*a2apb.Task, error)

func (*Handler) DeleteTaskPushNotificationConfig

func (h *Handler) DeleteTaskPushNotificationConfig(ctx context.Context, req *a2apb.DeleteTaskPushNotificationConfigRequest) (*emptypb.Empty, error)

func (*Handler) GetAgentCard

func (h *Handler) GetAgentCard(ctx context.Context, req *a2apb.GetAgentCardRequest) (*a2apb.AgentCard, error)

func (*Handler) GetTask

func (h *Handler) GetTask(ctx context.Context, req *a2apb.GetTaskRequest) (*a2apb.Task, error)

func (*Handler) RegisterWith

func (h *Handler) RegisterWith(s *grpc.Server)

RegisterWith registers as an A2AService implementation with the provided grpc.Server.

func (*Handler) SendMessage

func (*Handler) SendStreamingMessage

func (h *Handler) SendStreamingMessage(req *a2apb.SendMessageRequest, stream grpc.ServerStreamingServer[a2apb.StreamResponse]) error

func (*Handler) TaskSubscription

Jump to

Keyboard shortcuts

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