Skip to content

feat(gateway): implement ListContainerStream forwarding - #711

Open
flash7777 wants to merge 1 commit into
opencloud-eu:mainfrom
flash7777:feature/gateway-listcontainerstream
Open

feat(gateway): implement ListContainerStream forwarding#711
flash7777 wants to merge 1 commit into
opencloud-eu:mainfrom
flash7777:feature/gateway-listcontainerstream

Conversation

@flash7777

Copy link
Copy Markdown

Summary

The ListContainerStream gRPC RPC is defined in the CS3 API and already implemented in the storage provider, but the gateway returned Unimplemented. This change forwards the server-streaming RPC from the gateway to the responsible storage provider.

  • Resolves the space reference via findAndUnwrap (same as ListContainer)
  • Forwards all request fields (Opaque, Ref, ArbitraryMetadataKeys, FieldMask)
  • Streams individual ListContainerStreamResponse messages back to the caller
  • Same auth/permission chain as the existing unary ListContainer

Motivation

Internal OpenCloud services that traverse large directories (search indexer, thumbnail generator) currently use the unary ListContainer which buffers all entries in memory before responding. With the streaming variant, services can start processing entries immediately and reduce memory pressure for directories with thousands of files.

Test plan

  • Builds clean against current main
  • Verified against running OpenCloud instance: unpatched gateway returns Unimplemented, confirming the gap
  • Integration test with search service using streaming variant

Co-Authored-By: flash

The CS3 ListContainerStream RPC was already defined in the protobuf
spec and implemented in the storage provider, but the gateway returned
"Unimplemented". This change forwards the streaming RPC from the
gateway to the responsible storage provider, enabling gRPC clients to
receive directory listings as a stream of individual resource infos
instead of a single large response.

This is useful for:
- Large directories where buffering all entries is expensive
- Streaming clients that can start processing entries immediately
- Headless sync daemons that need efficient directory traversal

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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