Skip to content

feat: Add ability to use archives for certain server commands#1610

Draft
ploubser wants to merge 1 commit intonats-io:mainfrom
ploubser:archive_interface
Draft

feat: Add ability to use archives for certain server commands#1610
ploubser wants to merge 1 commit intonats-io:mainfrom
ploubser:archive_interface

Conversation

@ploubser
Copy link
Collaborator

Add the DataSource interface with server and archive implementations. This allows us to let certain server commands inspect the archived data instead of querying servers.

There is no behavioral changes when querying servers from the DataSource implementation. The same doReq callback is used to get responses, but the interface allows us to simulate these reponses by looking at the archive contents and responding with the data contained in it.

server report and server request commands are the first commands to have been ported to use this interface where it makes sense. The --archive flag activates this feature and will warn and or fail when used with invalid filter flags.

Add the DataSource interface with server and archive implementations. This
allows us to let certain server commands inspect the archived data instead
of querying servers.

There is no behavioral changes when querying servers from the DataSource
implementation. The same doReq callback is used to get responses, but the
interface allows us to simulate these reponses by looking at the archive
contents and responding with the data contained in it.

`server report` and `server request` commands are the first commands to have
been ported to use this interface where it makes sense. The --archive flag
activates this feature and will warn and or fail when used with invalid filter
flags.

Signed-off-by: Pieter Loubser <ploubser@gmail.com>
@ploubser ploubser force-pushed the archive_interface branch from dd37dbf to e71ec7b Compare March 12, 2026 10:12
@ploubser ploubser marked this pull request as draft March 12, 2026 10:12
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