Skip to content

Commit

Permalink
Move subject_delete_marker_ttl to a time.Duration
Browse files Browse the repository at this point in the history
Signed-off-by: R.I.Pienaar <[email protected]>
  • Loading branch information
ripienaar committed Jan 27, 2025
1 parent 5623676 commit fe3eb03
Show file tree
Hide file tree
Showing 20 changed files with 60 additions and 20 deletions.
2 changes: 1 addition & 1 deletion api/streams.go
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,7 @@ type StreamConfig struct {
// Enables placing markers in the stream for certain message delete operations
SubjectDeleteMarkers bool `json:"subject_delete_markers,omitempty" yaml:"subject_delete_markers"`
// When placing a marker, how long should it be valid, defaults to 15m
SubjectDeleteMarkerTTL string `json:"subject_delete_marker_ttl,omitempty" yaml:"subject_delete_marker_ttl"`
SubjectDeleteMarkerTTL time.Duration `json:"subject_delete_marker_ttl,omitempty" yaml:"subject_delete_marker_ttl"`
// The following defaults will apply to consumers when created against
// this stream, unless overridden manually. They also represent the maximum values that
// these properties may have
Expand Down
3 changes: 2 additions & 1 deletion schema_source/jetstream/api/v1/definitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -1241,7 +1241,8 @@
},
"subject_delete_marker_ttl": {
"description": "When placing a marker, how long should it be valid, defaults to 15m",
"type": "string"
"$ref": "#/definitions/golang_duration_nanos",
"minimum": 0
}
}
},
Expand Down
2 changes: 1 addition & 1 deletion schemas/jetstream/api/v1/consumer_configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@
}
},
"priority_policy": {
"description": "The policy the consumer is set to",
"description": "The priority policy the consumer is set to",
"type": "string",
"enum": [
"none",
Expand Down
2 changes: 1 addition & 1 deletion schemas/jetstream/api/v1/consumer_create_request.json
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@
}
},
"priority_policy": {
"description": "The policy the consumer is set to",
"description": "The priority policy the consumer is set to",
"type": "string",
"enum": [
"none",
Expand Down
2 changes: 1 addition & 1 deletion schemas/jetstream/api/v1/consumer_create_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@
}
},
"priority_policy": {
"description": "The policy the consumer is set to",
"description": "The priority policy the consumer is set to",
"type": "string",
"enum": [
"none",
Expand Down
2 changes: 1 addition & 1 deletion schemas/jetstream/api/v1/consumer_info_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@
}
},
"priority_policy": {
"description": "The policy the consumer is set to",
"description": "The priority policy the consumer is set to",
"type": "string",
"enum": [
"none",
Expand Down
2 changes: 1 addition & 1 deletion schemas/jetstream/api/v1/consumer_list_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@
}
},
"priority_policy": {
"description": "The policy the consumer is set to",
"description": "The priority policy the consumer is set to",
"type": "string",
"enum": [
"none",
Expand Down
5 changes: 4 additions & 1 deletion schemas/jetstream/api/v1/stream_configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,10 @@
},
"subject_delete_marker_ttl": {
"description": "When placing a marker, how long should it be valid, defaults to 15m",
"type": "string"
"minimum": 0,
"$comment": "nanoseconds depicting a duration in time, signed 64 bit integer",
"type": "integer",
"maximum": 9223372036854775807
}
}
}
5 changes: 4 additions & 1 deletion schemas/jetstream/api/v1/stream_create_request.json
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,10 @@
},
"subject_delete_marker_ttl": {
"description": "When placing a marker, how long should it be valid, defaults to 15m",
"type": "string"
"minimum": 0,
"$comment": "nanoseconds depicting a duration in time, signed 64 bit integer",
"type": "integer",
"maximum": 9223372036854775807
}
}
},
Expand Down
5 changes: 4 additions & 1 deletion schemas/jetstream/api/v1/stream_create_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,10 @@
},
"subject_delete_marker_ttl": {
"description": "When placing a marker, how long should it be valid, defaults to 15m",
"type": "string"
"minimum": 0,
"$comment": "nanoseconds depicting a duration in time, signed 64 bit integer",
"type": "integer",
"maximum": 9223372036854775807
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion schemas/jetstream/api/v1/stream_info_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,10 @@
},
"subject_delete_marker_ttl": {
"description": "When placing a marker, how long should it be valid, defaults to 15m",
"type": "string"
"minimum": 0,
"$comment": "nanoseconds depicting a duration in time, signed 64 bit integer",
"type": "integer",
"maximum": 9223372036854775807
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion schemas/jetstream/api/v1/stream_list_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,10 @@
},
"subject_delete_marker_ttl": {
"description": "When placing a marker, how long should it be valid, defaults to 15m",
"type": "string"
"minimum": 0,
"$comment": "nanoseconds depicting a duration in time, signed 64 bit integer",
"type": "integer",
"maximum": 9223372036854775807
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion schemas/jetstream/api/v1/stream_restore_request.json
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,10 @@
},
"subject_delete_marker_ttl": {
"description": "When placing a marker, how long should it be valid, defaults to 15m",
"type": "string"
"minimum": 0,
"$comment": "nanoseconds depicting a duration in time, signed 64 bit integer",
"type": "integer",
"maximum": 9223372036854775807
}
}
},
Expand Down
5 changes: 4 additions & 1 deletion schemas/jetstream/api/v1/stream_snapshot_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,10 @@
},
"subject_delete_marker_ttl": {
"description": "When placing a marker, how long should it be valid, defaults to 15m",
"type": "string"
"minimum": 0,
"$comment": "nanoseconds depicting a duration in time, signed 64 bit integer",
"type": "integer",
"maximum": 9223372036854775807
}
}
},
Expand Down
5 changes: 4 additions & 1 deletion schemas/jetstream/api/v1/stream_template_configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,10 @@
},
"subject_delete_marker_ttl": {
"description": "When placing a marker, how long should it be valid, defaults to 15m",
"type": "string"
"minimum": 0,
"$comment": "nanoseconds depicting a duration in time, signed 64 bit integer",
"type": "integer",
"maximum": 9223372036854775807
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion schemas/jetstream/api/v1/stream_template_create_request.json
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,10 @@
},
"subject_delete_marker_ttl": {
"description": "When placing a marker, how long should it be valid, defaults to 15m",
"type": "string"
"minimum": 0,
"$comment": "nanoseconds depicting a duration in time, signed 64 bit integer",
"type": "integer",
"maximum": 9223372036854775807
}
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,10 @@
},
"subject_delete_marker_ttl": {
"description": "When placing a marker, how long should it be valid, defaults to 15m",
"type": "string"
"minimum": 0,
"$comment": "nanoseconds depicting a duration in time, signed 64 bit integer",
"type": "integer",
"maximum": 9223372036854775807
}
}
},
Expand Down
5 changes: 4 additions & 1 deletion schemas/jetstream/api/v1/stream_template_info_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,10 @@
},
"subject_delete_marker_ttl": {
"description": "When placing a marker, how long should it be valid, defaults to 15m",
"type": "string"
"minimum": 0,
"$comment": "nanoseconds depicting a duration in time, signed 64 bit integer",
"type": "integer",
"maximum": 9223372036854775807
}
}
},
Expand Down
5 changes: 4 additions & 1 deletion schemas/jetstream/api/v1/stream_update_request.json
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,10 @@
},
"subject_delete_marker_ttl": {
"description": "When placing a marker, how long should it be valid, defaults to 15m",
"type": "string"
"minimum": 0,
"$comment": "nanoseconds depicting a duration in time, signed 64 bit integer",
"type": "integer",
"maximum": 9223372036854775807
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion schemas/jetstream/api/v1/stream_update_response.json
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,10 @@
},
"subject_delete_marker_ttl": {
"description": "When placing a marker, how long should it be valid, defaults to 15m",
"type": "string"
"minimum": 0,
"$comment": "nanoseconds depicting a duration in time, signed 64 bit integer",
"type": "integer",
"maximum": 9223372036854775807
}
}
}
Expand Down

0 comments on commit fe3eb03

Please sign in to comment.