Skip to content

docs: add Go external storage snipsync snippets#804

Open
lennessyy wants to merge 5 commits intomainfrom
docs/external-storage-snippets-go
Open

docs: add Go external storage snipsync snippets#804
lennessyy wants to merge 5 commits intomainfrom
docs/external-storage-snippets-go

Conversation

@lennessyy
Copy link
Copy Markdown
Contributor

Summary

  • Add Go snippet files for external storage documentation alongside the existing Python snippets
  • Covers: S3 driver setup, custom storage driver, threshold configuration, and multiple driver selection
  • Updates go.mod with s3driver v0.1.1 and aws-sdk-go-v2 dependencies

Test plan

  • go build ./snippets/external_storage/... passes
  • CI passes

🤖 Generated with Claude Code

Add Go snippet files for external storage documentation alongside the
existing Python snippets. Covers S3 driver setup, custom storage driver,
threshold configuration, and multiple driver selection.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@lennessyy lennessyy requested review from a team as code owners April 9, 2026 20:13
"go.temporal.io/sdk/converter"
)

func ThresholdConfig(driver converter.StorageDriver) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it not expected that these functions are called/tested in this repo?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the snippet bar is "called/tested" but "does it compile"?

- Remove unnecessary awss3 import alias
- Return converter.StorageDriver interface from constructor
- Fix PayloadSizeThreshold minimum from 0 to 1

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
storeDir string
}

func NewLocalDiskStorageDriver(storeDir string) *LocalDiskStorageDriver {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
func NewLocalDiskStorageDriver(storeDir string) *LocalDiskStorageDriver {
func NewLocalDiskStorageDriver(storeDir string) StorageDriver {

payloads []*commonpb.Payload,
) ([]converter.StorageDriverClaim, error) {
dir := d.storeDir
if info, ok := ctx.Target.(converter.StorageDriverWorkflowInfo); ok && info.WorkflowID != "" {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd add another one for StorageDriverActivityInfo that pulls out the activity ID and namespace and appends similarly.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only for standalone activities right?

}
return payloads, nil
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Should the snipend be right after the closing brackets to minimize whitespace in the code blocks? Apply decision to all files.

"go.temporal.io/sdk/converter"
)

func ThresholdConfig(driver converter.StorageDriver) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think the snippet bar is "called/tested" but "does it compile"?

lennessyy and others added 3 commits April 10, 2026 12:53
- Add StorageDriverActivityInfo handling in custom driver
- Remove blank lines before SNIPEND markers

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@lennessyy lennessyy enabled auto-merge (squash) April 10, 2026 21:09
@lennessyy lennessyy disabled auto-merge April 10, 2026 21:09
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.

3 participants