Skip to content

Commit fba5bb3

Browse files
authored
feat: supports new caught up and fell behind events. (#413)
* feat: supports new caught up and fell behind events.
1 parent 7010b68 commit fba5bb3

File tree

8 files changed

+1162
-344
lines changed

8 files changed

+1162
-344
lines changed

packages/db-client/generated/streams_grpc_pb.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import * as grpc from "@grpc/grpc-js";
88
import * as streams_pb from "./streams_pb";
99
import * as shared_pb from "./shared_pb";
1010
import * as status_pb from "./status_pb";
11+
import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb";
1112
import * as google_protobuf_empty_pb from "google-protobuf/google/protobuf/empty_pb";
1213
import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb";
1314

packages/db-client/generated/streams_grpc_pb.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ var grpc = require('@grpc/grpc-js');
55
var streams_pb = require('./streams_pb.js');
66
var shared_pb = require('./shared_pb.js');
77
var status_pb = require('./status_pb.js');
8+
var google_protobuf_duration_pb = require('google-protobuf/google/protobuf/duration_pb.js');
89
var google_protobuf_empty_pb = require('google-protobuf/google/protobuf/empty_pb.js');
910
var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js');
1011

packages/db-client/generated/streams_pb.d.ts

Lines changed: 82 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import * as jspb from "google-protobuf";
88
import * as shared_pb from "./shared_pb";
99
import * as status_pb from "./status_pb";
10+
import * as google_protobuf_duration_pb from "google-protobuf/google/protobuf/duration_pb";
1011
import * as google_protobuf_empty_pb from "google-protobuf/google/protobuf/empty_pb";
1112
import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb";
1213

@@ -493,6 +494,21 @@ export namespace ReadResp {
493494

494495
export class CaughtUp extends jspb.Message {
495496

497+
hasTimestamp(): boolean;
498+
clearTimestamp(): void;
499+
getTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined;
500+
setTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): CaughtUp;
501+
502+
hasStreamRevision(): boolean;
503+
clearStreamRevision(): void;
504+
getStreamRevision(): string | undefined;
505+
setStreamRevision(value: string): CaughtUp;
506+
507+
hasPosition(): boolean;
508+
clearPosition(): void;
509+
getPosition(): ReadResp.Position | undefined;
510+
setPosition(value?: ReadResp.Position): CaughtUp;
511+
496512
serializeBinary(): Uint8Array;
497513
toObject(includeInstance?: boolean): CaughtUp.AsObject;
498514
static toObject(includeInstance: boolean, msg: CaughtUp): CaughtUp.AsObject;
@@ -505,11 +521,29 @@ export namespace ReadResp {
505521

506522
export namespace CaughtUp {
507523
export type AsObject = {
524+
timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject,
525+
streamRevision?: string,
526+
position?: ReadResp.Position.AsObject,
508527
}
509528
}
510529

511530
export class FellBehind extends jspb.Message {
512531

532+
hasTimestamp(): boolean;
533+
clearTimestamp(): void;
534+
getTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined;
535+
setTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): FellBehind;
536+
537+
hasStreamRevision(): boolean;
538+
clearStreamRevision(): void;
539+
getStreamRevision(): string | undefined;
540+
setStreamRevision(value: string): FellBehind;
541+
542+
hasPosition(): boolean;
543+
clearPosition(): void;
544+
getPosition(): ReadResp.Position | undefined;
545+
setPosition(value?: ReadResp.Position): FellBehind;
546+
513547
serializeBinary(): Uint8Array;
514548
toObject(includeInstance?: boolean): FellBehind.AsObject;
515549
static toObject(includeInstance: boolean, msg: FellBehind): FellBehind.AsObject;
@@ -522,6 +556,9 @@ export namespace ReadResp {
522556

523557
export namespace FellBehind {
524558
export type AsObject = {
559+
timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject,
560+
streamRevision?: string,
561+
position?: ReadResp.Position.AsObject,
525562
}
526563
}
527564

@@ -656,6 +693,11 @@ export namespace ReadResp {
656693
getPreparePosition(): string;
657694
setPreparePosition(value: string): Checkpoint;
658695

696+
hasTimestamp(): boolean;
697+
clearTimestamp(): void;
698+
getTimestamp(): google_protobuf_timestamp_pb.Timestamp | undefined;
699+
setTimestamp(value?: google_protobuf_timestamp_pb.Timestamp): Checkpoint;
700+
659701
serializeBinary(): Uint8Array;
660702
toObject(includeInstance?: boolean): Checkpoint.AsObject;
661703
static toObject(includeInstance: boolean, msg: Checkpoint): Checkpoint.AsObject;
@@ -667,6 +709,30 @@ export namespace ReadResp {
667709
}
668710

669711
export namespace Checkpoint {
712+
export type AsObject = {
713+
commitPosition: string,
714+
preparePosition: string,
715+
timestamp?: google_protobuf_timestamp_pb.Timestamp.AsObject,
716+
}
717+
}
718+
719+
export class Position extends jspb.Message {
720+
getCommitPosition(): string;
721+
setCommitPosition(value: string): Position;
722+
getPreparePosition(): string;
723+
setPreparePosition(value: string): Position;
724+
725+
serializeBinary(): Uint8Array;
726+
toObject(includeInstance?: boolean): Position.AsObject;
727+
static toObject(includeInstance: boolean, msg: Position): Position.AsObject;
728+
static extensions: {[key: number]: jspb.ExtensionFieldInfo<jspb.Message>};
729+
static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo<jspb.Message>};
730+
static serializeBinaryToWriter(message: Position, writer: jspb.BinaryWriter): void;
731+
static deserializeBinary(bytes: Uint8Array): Position;
732+
static deserializeBinaryFromReader(message: Position, reader: jspb.BinaryReader): Position;
733+
}
734+
735+
export namespace Position {
670736
export type AsObject = {
671737
commitPosition: string,
672738
preparePosition: string,
@@ -1148,12 +1214,18 @@ export namespace BatchAppendReq {
11481214
getStreamExists(): google_protobuf_empty_pb.Empty | undefined;
11491215
setStreamExists(value?: google_protobuf_empty_pb.Empty): Options;
11501216

1217+
hasDeadline21100(): boolean;
1218+
clearDeadline21100(): void;
1219+
getDeadline21100(): google_protobuf_timestamp_pb.Timestamp | undefined;
1220+
setDeadline21100(value?: google_protobuf_timestamp_pb.Timestamp): Options;
1221+
11511222
hasDeadline(): boolean;
11521223
clearDeadline(): void;
1153-
getDeadline(): google_protobuf_timestamp_pb.Timestamp | undefined;
1154-
setDeadline(value?: google_protobuf_timestamp_pb.Timestamp): Options;
1224+
getDeadline(): google_protobuf_duration_pb.Duration | undefined;
1225+
setDeadline(value?: google_protobuf_duration_pb.Duration): Options;
11551226

11561227
getExpectedStreamPositionCase(): Options.ExpectedStreamPositionCase;
1228+
getDeadlineOptionCase(): Options.DeadlineOptionCase;
11571229

11581230
serializeBinary(): Uint8Array;
11591231
toObject(includeInstance?: boolean): Options.AsObject;
@@ -1172,7 +1244,8 @@ export namespace BatchAppendReq {
11721244
noStream?: google_protobuf_empty_pb.Empty.AsObject,
11731245
any?: google_protobuf_empty_pb.Empty.AsObject,
11741246
streamExists?: google_protobuf_empty_pb.Empty.AsObject,
1175-
deadline?: google_protobuf_timestamp_pb.Timestamp.AsObject,
1247+
deadline21100?: google_protobuf_timestamp_pb.Timestamp.AsObject,
1248+
deadline?: google_protobuf_duration_pb.Duration.AsObject,
11761249
}
11771250

11781251
export enum ExpectedStreamPositionCase {
@@ -1183,6 +1256,12 @@ export namespace BatchAppendReq {
11831256
STREAM_EXISTS = 5,
11841257
}
11851258

1259+
export enum DeadlineOptionCase {
1260+
DEADLINE_OPTION_NOT_SET = 0,
1261+
DEADLINE_21_10_0 = 6,
1262+
DEADLINE = 7,
1263+
}
1264+
11861265
}
11871266

11881267
export class ProposedMessage extends jspb.Message {

0 commit comments

Comments
 (0)