Channel
View as MarkdownThis page lists the Go SDK names for Channels. The doc comment of each API gives its parameters, defaults, and errors. Read them in the Go SDK API reference.
API names
| Task | Go API | Dex behavior |
|---|---|---|
| Define a Channel | DefineChannel, which returns a Channel | Channels |
| Define a ChannelMap | DefineChannelMap, which returns a ChannelMap | ChannelMap |
| Declare it in the Flow | Channels of PersistenceSchema, returned from GetPersistenceSchema | Flow definition |
| Publish a message from a Step or RPC | Publish | Commits |
| Wait for messages | ForOne, ForN, AtLeast, AtMost, and AtLeastAtMost | Wait conditions |
| Read the messages a wait consumed | GetConditionResults | Channel results |
| Load pending messages for a method | ChannelMap.LoadMessages, with the load fields of StepOptions or RPCOptions | Selective state loading |
| Read loaded pending messages | PendingMessages and FindPendingMessage | Pending messages |
| Delete a pending message | Delete | Pending messages |
| Read the number of pending messages | Size | Selective state loading |
| Count ChannelMap instances and list their keys | ChannelMap.MapSize and ChannelMap.AllInstanceKeys | ChannelMap |
| Complete the Flow only when Channels are empty | ForceCompleteIfChannelsEmpty | ForceCompleteIfChannelsEmpty |