Skip to content

Commit 437af4f

Browse files
Added additional description for websocket data providers Run method
1 parent f8d711f commit 437af4f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

engine/access/rest/websockets/data_providers/data_provider.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,17 @@ type DataProvider interface {
1717
Close() error
1818
// Run starts processing the subscription and handles responses.
1919
//
20+
// The separation of the data provider's creation and its Run() method
21+
// allows for better control over the subscription lifecycle. By doing so,
22+
// a confirmation message can be sent to the client immediately upon
23+
// successful subscription creation or failure. This ensures any required
24+
// setup or preparation steps can be handled prior to initiating the
25+
// subscription and data streaming process.
26+
//
27+
// Run() begins the actual processing of the subscription. At this point,
28+
// the context used for provider creation is no longer needed, as all
29+
// necessary preparation steps should have been completed.
30+
//
2031
// No errors are expected during normal operations.
2132
Run() error
2233
}

0 commit comments

Comments
 (0)