Skip to content

Commit

Permalink
Merge pull request #68 from gadget-inc/sc/grpc-client-get-from-to
Browse files Browse the repository at this point in the history
  • Loading branch information
scott-rc authored Oct 26, 2023
2 parents f0f5886 + 29a5211 commit 893c9fe
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion js/src/grpc-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,21 +261,27 @@ export class DateiLagerGrpcClient {
*
* @param project The id of the project.
* @param path The path of the object.
* @param from The project version to start from.
* @param to The project version to end at.
* @returns The object at the given path or undefined if it does not exist.
*/
public async getObject(project: bigint, path: string): Promise<Objekt | undefined> {
public async getObject(project: bigint, path: string, from?: bigint, to?: bigint): Promise<Objekt | undefined> {
return await trace(
"dateilager-grpc-client.get-object",
{
attributes: {
"dl.project": String(project),
"dl.path": path,
"dl.from_version": String(from),
"dl.to_version": String(to),
},
},
async () => {
const call = this._client.get(
{
project,
fromVersion: from,
toVersion: to,
queries: [
{
path,
Expand Down

0 comments on commit 893c9fe

Please sign in to comment.