Skip to content

Commit ee41047

Browse files
committed
Update capabilities.go
1 parent 3cc19ef commit ee41047

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

pkg/capabilities/capabilities.go

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -341,15 +341,20 @@ type TriggerExecutable interface {
341341
AckEvent(ctx context.Context, triggerId string, eventId string) error
342342
}
343343

344-
type BaseTriggerCapability struct {
344+
type BaseTriggerCapability interface {
345345
/*
346346
Keeps track of workflow registrations (similar to LLO streams trigger).
347347
Handles retransmits based on T_retransmit and T_max.
348348
Persists pending events in the DB to be resilient to node restarts.
349349
*/
350+
deliverEvent(event *TriggerEvent, workflowIDs []string) error
350351
}
351352

352-
func (*BaseTriggerCapability) deliverEvent(event *TriggerEvent, workflowIDs []string) error {
353+
type BaseTriggerCapabilityImpl struct {
354+
// TODO: Every Trigger Capability should use this common implementation
355+
}
356+
357+
func (*BaseTriggerCapabilityImpl) deliverEvent(event *TriggerEvent, workflowIDs []string) error {
353358
/*
354359
Base Trigger Capability can interact with the Don2Don layer (in the remote capability setting)
355360
as well as directly with a consumer (in the local setting).
@@ -359,8 +364,8 @@ func (*BaseTriggerCapability) deliverEvent(event *TriggerEvent, workflowIDs []st
359364

360365
// TriggerCapability interface needs to be implemented by all trigger capabilities.
361366
type TriggerCapability interface {
362-
BaseTriggerCapability
363367
BaseCapability
368+
BaseTriggerCapability
364369
TriggerExecutable
365370
}
366371

0 commit comments

Comments
 (0)