Skip to content
This repository was archived by the owner on Jun 18, 2025. It is now read-only.

Commit 8206ac8

Browse files
authored
Deprecate RequiresLeader in persistent options (#186)
1 parent f669bbf commit 8206ac8

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

esdb/persistent_options.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ type PersistentStreamSubscriptionOptions struct {
1212
Authenticated *Credentials
1313
// A length of time to use for gRPC deadlines.
1414
Deadline *time.Duration
15+
// Requires the request to be performed by the leader of the cluster.
16+
//
17+
// Deprecated: RequiresLeader has no effect and will be removed in the next major version.
18+
RequiresLeader bool
1519
}
1620

1721
func (o *PersistentStreamSubscriptionOptions) kind() operationKind {
@@ -118,6 +122,10 @@ type DeletePersistentSubscriptionOptions struct {
118122
Authenticated *Credentials
119123
// A length of time to use for gRPC deadlines.
120124
Deadline *time.Duration
125+
// Requires the request to be performed by the leader of the cluster.
126+
//
127+
// Deprecated: RequiresLeader has no effect and will be removed in the next major version.
128+
RequiresLeader bool
121129
}
122130

123131
func (d *DeletePersistentSubscriptionOptions) kind() operationKind {
@@ -144,6 +152,10 @@ type ReplayParkedMessagesOptions struct {
144152
StopAt int
145153
// A length of time to use for gRPC deadlines.
146154
Deadline *time.Duration
155+
// Requires the request to be performed by the leader of the cluster.
156+
//
157+
// Deprecated: RequiresLeader has no effect and will be removed in the next major version.
158+
RequiresLeader bool
147159
}
148160

149161
func (r *ReplayParkedMessagesOptions) kind() operationKind {
@@ -168,6 +180,10 @@ type ListPersistentSubscriptionsOptions struct {
168180
Authenticated *Credentials
169181
// A length of time to use for gRPC deadlines.
170182
Deadline *time.Duration
183+
// Requires the request to be performed by the leader of the cluster.
184+
//
185+
// Deprecated: RequiresLeader has no effect and will be removed in the next major version.
186+
RequiresLeader bool
171187
}
172188

173189
func (l *ListPersistentSubscriptionsOptions) kind() operationKind {
@@ -192,6 +208,10 @@ type GetPersistentSubscriptionOptions struct {
192208
Authenticated *Credentials
193209
// A length of time to use for gRPC deadlines.
194210
Deadline *time.Duration
211+
// Requires the request to be performed by the leader of the cluster.
212+
//
213+
// Deprecated: RequiresLeader has no effect and will be removed in the next major version.
214+
RequiresLeader bool
195215
}
196216

197217
func (g *GetPersistentSubscriptionOptions) kind() operationKind {
@@ -216,6 +236,10 @@ type RestartPersistentSubscriptionSubsystemOptions struct {
216236
Authenticated *Credentials
217237
// A length of time to use for gRPC deadlines.
218238
Deadline *time.Duration
239+
// Requires the request to be performed by the leader of the cluster.
240+
//
241+
// Deprecated: RequiresLeader has no effect and will be removed in the next major version.
242+
RequiresLeader bool
219243
}
220244

221245
func (g *RestartPersistentSubscriptionSubsystemOptions) kind() operationKind {

0 commit comments

Comments
 (0)