Skip to content

Feat: Add Go Timestamp Extension Sample#655

Open
Iwaniukooo11 wants to merge 6 commits into
mainfrom
mateusziwaniuk/timestamp-go-sample-feat-clean
Open

Feat: Add Go Timestamp Extension Sample#655
Iwaniukooo11 wants to merge 6 commits into
mainfrom
mateusziwaniuk/timestamp-go-sample-feat-clean

Conversation

@Iwaniukooo11

Copy link
Copy Markdown
Member

PR Description: Feat: Add Go Timestamp Extension Sample

Overview

This PR introduces a brand-new Go implementation of the Timestamp Extension sample using a2a-go/v2.

The sample demonstrates how to enrich outgoing A2A messages and artifacts with compliance timestamps in a modular, decoupled, and automated manner. Its architecture is aligned with the latest Python sample standards.

Key Features

  1. Modular Architecture & Package Structure

    • timestamp_ext/: The core library package.
      • core.go: Houses the main TimestampExtension struct, metadata settings, and functional options (like WithClock for testing).
      • server.go: Implements server-side interceptors (ServerInterceptor) and WrapExecutor to automatically timestamp outgoing messages and artifacts.
      • client.go: Implements ClientInterceptor to inject the extensions header and stamp client messages.
    • Showcase Server (main.go & agent_executor.go): Launches an HTTP JSON-RPC agent server running an echoExecutor that delegates response text generation to an echoAgent struct.
    • Integration Client Tests (client_test.go): Validates the end-to-end client-server round trip, verifying that both message and artifact metadata timestamps are correctly generated and verified.
  2. Compliance & Testing Support

    • Supports fixed clock generation (via WithClock) for deterministic end-to-end testing verification.
  3. Complete Showcase Documentation

    • Includes a fully detailed README.md containing architectural walkthroughs, usage guides for both server-side and client-side setup, and instructions on running the standalone server and tests.

@Iwaniukooo11 Iwaniukooo11 changed the title Mateusziwaniuk/timestamp go sample feat clean Feat: Add Go Timestamp Extension Sample Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant