Skip to content

Commit 258410c

Browse files
authored
feat: Adds support for new attributes for Trigger configuration (#6)
1 parent 3c82f0d commit 258410c

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

appservices/event_triggers.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,4 +210,7 @@ type EventTriggerConfig struct {
210210
ScheduleType string `json:"schedule_type,omitempty"`
211211
Unordered *bool `json:"unordered,omitempty"`
212212
ClusterName string `json:"clusterName,omitempty"`
213+
TolerateResumeErrors *bool `json:"tolerate_resume_errors,omitempty"`
214+
SkipCatchupEvents *bool `json:"skip_catchup_events,omitempty"`
215+
MaximumThroughput *bool `json:"maximum_throughput,omitempty"`
213216
}

appservices/event_triggers_test.go

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,9 @@ func TestEventTriggers_CreateDatabase(t *testing.T) {
128128
Project: `{"updateDescription.updatedFields.FieldA": 1, "operationType": 1}`,
129129
FullDocument: pointy.Bool(false),
130130
FullDocumentBeforeChange: pointy.Bool(false),
131+
TolerateResumeErrors: pointy.Bool(true),
132+
SkipCatchupEvents: pointy.Bool(true),
133+
MaximumThroughput: pointy.Bool(true),
131134
Unordered: pointy.Bool(false),
132135
},
133136
EventProcessors: map[string]interface{}{
@@ -159,6 +162,9 @@ func TestEventTriggers_CreateDatabase(t *testing.T) {
159162
"full_document": false,
160163
"full_document_before_change": false,
161164
"unordered": false,
165+
"tolerate_resume_errors": true,
166+
"skip_catchup_events": true,
167+
"maximum_throughput": true,
162168
},
163169
"event_processors": map[string]interface{}{
164170
"AWS_EVENTBRIDGE": map[string]interface{}{
@@ -204,7 +210,10 @@ func TestEventTriggers_CreateDatabase(t *testing.T) {
204210
"project": {"updateDescription.updatedFields.FieldA": 1, "operationType": 1},
205211
"full_document": false,
206212
"full_document_before_change": false,
207-
"unordered": false
213+
"unordered": false,
214+
"tolerate_resume_errors": true,
215+
"skip_catchup_events": true,
216+
"maximum_throughput": true
208217
},
209218
"event_processors": {
210219
"AWS_EVENTBRIDGE": {
@@ -248,6 +257,9 @@ func TestEventTriggers_CreateDatabase(t *testing.T) {
248257
FullDocument: pointy.Bool(false),
249258
FullDocumentBeforeChange: pointy.Bool(false),
250259
Unordered: pointy.Bool(false),
260+
TolerateResumeErrors: pointy.Bool(true),
261+
SkipCatchupEvents: pointy.Bool(true),
262+
MaximumThroughput: pointy.Bool(true),
251263
ClusterName: "cluster name",
252264
},
253265
EventProcessors: map[string]interface{}{

0 commit comments

Comments
 (0)