Skip to content

Commit

Permalink
Proposed names/meanings for microsoft#9677 discussion
Browse files Browse the repository at this point in the history
  • Loading branch information
markfields committed Mar 30, 2022
1 parent 27592a9 commit 6dc262f
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions packages/loader/container-loader/src/naming.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
* `IContainer` (public):
* `connectionState: ConnectionState`
* `Disconnected`: no socket connection to delta server
* `Connecting`: socket connection established but we're not caught up
* `Pending`: socket connection established but we're not caught up
* Unable to send outbound messages
* Maybe inbound is still paused too, depends on `IContainerLoadMode.opsBeforeReturn`
* `Connected`: connected and caught up
Expand All @@ -10,19 +10,21 @@
* Inbound/Outbound are operational (...is there a possible race condition if `IContainerLoadMode.opsBeforeReturn === undefined`?)
* `connected: boolean`
* `connectionState === ConnectionState.Connected`
* `resume()`
* Calls `DeltaManager.connect`
* `setAutoReconnect(reconnect: boolean)`
* If false, will disconnect from delta stream. If true, will probably connect to delta stream
* `connect()`
* Calls `DeltaManager.connect` (and picks up some semantics from old `setAutoReconnect`?)
* `disconnect()`
* Disconnect from delta stream, until `connect()` is called again.
* events emitted:
* `connecting`: when starting to establish connection
* `connectionPending`: when transitioned to Pending state
* `connected`: when transitioned to Connected state
* `disconnected`: when transitioned to Disconnected state
* `IDeltaManager` (public):
* `active: boolean`
* Indicates `Container.connectionState === Connected` and mode is write
* events emitted
* `connect`: when socket is established. Triggers Container transition to `Connecting` state
* `disconnect`: when socket is disconnected. Triggers Container transition to `Disconnected` state
* `deltaStreamConnected`: when socket is established. Triggers Container transition to `Pending` state
* `deltaStreamDisconnected`: when socket is disconnected. Triggers Container transition to `Disconnected` state
* `DeltaManager` class (private)
* `connect`
* `connectToDeltaStream`
* Connect to delta stream

0 comments on commit 6dc262f

Please sign in to comment.