Skip to content

Commit c93f1ab

Browse files
committed
loop: add notification versioning
1 parent 518a450 commit c93f1ab

File tree

3 files changed

+390
-314
lines changed

3 files changed

+390
-314
lines changed

notifications/manager.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ const (
3636
// connection to the server needs to be alive before we consider it a
3737
// successful connection.
3838
defaultMinAliveConnTime = time.Minute
39+
40+
// current_version is the current version of the notification listener.
41+
current_version = swapserverrpc.SubscribeNotificationsRequest_V1
3942
)
4043

4144
// Client is the interface that the notification manager needs to implement in
@@ -260,7 +263,9 @@ func (m *Manager) subscribeNotifications(ctx context.Context) error {
260263
defer cancel()
261264

262265
notifStream, err := m.cfg.Client.SubscribeNotifications(
263-
callCtx, &swapserverrpc.SubscribeNotificationsRequest{},
266+
callCtx, &swapserverrpc.SubscribeNotificationsRequest{
267+
Version: current_version,
268+
},
264269
)
265270
if err != nil {
266271
return err

0 commit comments

Comments
 (0)