Skip to content

Commit 94b76ad

Browse files
Simplify uSubscription::Reset operation (#322)
* Remove Reset.before parameter, correct spec text
1 parent f3ff839 commit 94b76ad

2 files changed

Lines changed: 14 additions & 12 deletions

File tree

up-core-api/uprotocol/core/usubscription/v3/usubscription.proto

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,14 @@ message SubscriberInfo {
133133
message SubscriptionStatus {
134134
enum State {
135135

136-
UNSUBSCRIBED = 0; // Default state to indicate not subscribed
136+
UNSUBSCRIBED = 0; // Default state to indicate not subscribed
137137

138-
SUBSCRIBE_PENDING = 1; // Subscription is pending confirmation from remote
138+
SUBSCRIBE_PENDING = 1; // Subscription is pending confirmation from remote
139139
// uSubscription Service
140140

141-
SUBSCRIBED = 2; // Subscription has been successful
141+
SUBSCRIBED = 2; // Subscription has been successful
142142

143-
UNSUBSCRIBE_PENDING = 3; // Unsubscribe is pending confirmation from the
143+
UNSUBSCRIBE_PENDING = 3; // Unsubscribe is pending confirmation from the
144144
// remote uSubscription Service
145145
}
146146

@@ -325,7 +325,7 @@ message Update {
325325
// *NOTE*: This attribute is an internal platform setting (for now) and not
326326
// exposed as part of SubscribeAttributes.
327327
message PassiveMode {
328-
bool enable = 1; // Enable passive subscription mode
328+
bool enable = 1; // Enable passive subscription mode
329329
}
330330

331331

@@ -336,22 +336,24 @@ message ResetRequest {
336336
// Reason for the reset
337337
optional Reason reason = 1;
338338

339+
// DEPRECATED
339340
// Reset all subscriptions that are before this time, if omitted, the
340341
// current time is assumed
341-
optional google.protobuf.Timestamp before = 2;
342-
342+
//optional google.protobuf.Timestamp before = 2;
343+
reserved 2;
344+
343345
// The reason for triggering a reset, this is an optional attribute used
344346
// to provide insight as to why a reset occurred
345347
// More reasons will be added as we distill the business logic
346348
message Reason {
347-
Code code = 1; // Reason code
349+
Code code = 1; // Reason code
348350
optional string message = 2; // Reason message
349351

350352
// Reason code
351353
enum Code {
352-
UNSPECIFIED = 0; // Default non-specified reason for issuing a reset
353-
FACTORY_RESET = 1; // Factory reset
354-
CORRUPTED_DATA = 2; // Corrupted data
354+
UNSPECIFIED = 0; // Default non-specified reason for issuing a reset
355+
FACTORY_RESET = 1; // Factory reset
356+
CORRUPTED_DATA = 2; // Corrupted data
355357
}
356358
}
357359
}

up-l3/usubscription/v3/README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -455,7 +455,7 @@ Subscribe (and unsubscribe) to remote topics are handled by RPC calls between uS
455455
[#reset-operation]
456456
== Reset
457457

458-
This is a private API, to be used only between uSubscription services. Regular uEntities can call Unsubscribe() to flush their own subscriptions.
458+
This is a private API, to be used only between uSubscription services.
459459

460460
[.specitem,oft-sid="dsn~usubscription-reset-protobuf~1",oft-needs="impl,utest"]
461461
****

0 commit comments

Comments
 (0)