Feat: Add Go Timestamp Extension Sample#655
Open
Iwaniukooo11 wants to merge 6 commits into
Open
Conversation
…se files, outsource agent executor, and rename fixed time variable
…place hard tabs in README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Modular Architecture & Package Structure
timestamp_ext/: The core library package.core.go: Houses the mainTimestampExtensionstruct, metadata settings, and functional options (likeWithClockfor testing).server.go: Implements server-side interceptors (ServerInterceptor) andWrapExecutorto automatically timestamp outgoing messages and artifacts.client.go: ImplementsClientInterceptorto inject the extensions header and stamp client messages.main.go&agent_executor.go): Launches an HTTP JSON-RPC agent server running anechoExecutorthat delegates response text generation to anechoAgentstruct.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.Compliance & Testing Support
WithClock) for deterministic end-to-end testing verification.Complete Showcase Documentation
README.mdcontaining architectural walkthroughs, usage guides for both server-side and client-side setup, and instructions on running the standalone server and tests.