nexus_events.go ×9

Frontier kind: Code frontier

unlabeled · c_4b6cd51be5f6

48 tests · 2525 LOC · 127 files · introduces 0 tests · 50 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
12 ranges50 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
382 ranges2525 lines · 127 files · Browse complete extent
All tests (intent)
48 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

2 files ranked by introduced lines: 50 introduced LOC across 12 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/chasm/lib/workflow/nexus_events.go 27 introduced LOC · 9 ranges

Open complete file

19 }
20
21 > func (d ScheduledEventDefinition) Type() enumspb.EventType { nexus_events.go
22 > return enumspb.EVENT_TYPE_NEXUS_OPERATION_SCHEDULED
23 > }
24
25 func (d ScheduledEventDefinition) Apply(ctx chasm.MutableContext, wf *Workflow, event *historypb.HistoryEvent) error {
75 }
76
77 > func (d CancelRequestedEventDefinition) Type() enumspb.EventType { nexus_events.go
78 > return enumspb.EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUESTED
79 > }
80
81 func (d CancelRequestedEventDefinition) Apply(ctx chasm.MutableContext, wf *Workflow, event *historypb.HistoryEvent) error {
113 }
114
115 > func (d CancelRequestCompletedEventDefinition) Type() enumspb.EventType { nexus_events.go
116 > return enumspb.EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_COMPLETED
117 > }
118
119 func (d CancelRequestCompletedEventDefinition) Apply(ctx chasm.MutableContext, wf *Workflow, event *historypb.HistoryEvent) error {
143 }
144
145 > func (d CancelRequestFailedEventDefinition) Type() enumspb.EventType { nexus_events.go
146 > return enumspb.EVENT_TYPE_NEXUS_OPERATION_CANCEL_REQUEST_FAILED
147 > }
148
149 func (d CancelRequestFailedEventDefinition) Apply(ctx chasm.MutableContext, wf *Workflow, event *historypb.HistoryEvent) error {
175 }
176
177 > func (d StartedEventDefinition) Type() enumspb.EventType { nexus_events.go
178 > return enumspb.EVENT_TYPE_NEXUS_OPERATION_STARTED
179 > }
180
181 func (d StartedEventDefinition) Apply(ctx chasm.MutableContext, wf *Workflow, event *historypb.HistoryEvent) error {
209 }
210
211 > func (d CompletedEventDefinition) Type() enumspb.EventType { nexus_events.go
212 > return enumspb.EVENT_TYPE_NEXUS_OPERATION_COMPLETED
213 > }
214
215 func (d CompletedEventDefinition) Apply(ctx chasm.MutableContext, wf *Workflow, event *historypb.HistoryEvent) error {
247 }
248
249 > func (d FailedEventDefinition) Type() enumspb.EventType { nexus_events.go
250 > return enumspb.EVENT_TYPE_NEXUS_OPERATION_FAILED
251 > }
252
253 func (d FailedEventDefinition) Apply(ctx chasm.MutableContext, wf *Workflow, event *historypb.HistoryEvent) error {
285 }
286
287 > func (d CanceledEventDefinition) Type() enumspb.EventType { nexus_events.go
288 > return enumspb.EVENT_TYPE_NEXUS_OPERATION_CANCELED
289 > }
290
291 func (d CanceledEventDefinition) Apply(ctx chasm.MutableContext, wf *Workflow, event *historypb.HistoryEvent) error {
323 }
324
325 > func (d TimedOutEventDefinition) Type() enumspb.EventType { nexus_events.go
326 > return enumspb.EVENT_TYPE_NEXUS_OPERATION_TIMED_OUT
327 > }
328
329 func (d TimedOutEventDefinition) Apply(ctx chasm.MutableContext, wf *Workflow, event *historypb.HistoryEvent) error {
go.temporal.io/server/chasm/lib/workflow/nexus_library.go 23 introduced LOC · 3 ranges

Open complete file

12 }
13
14 > func newNexusLibrary(config *nexusoperation.Config, nexusProcessor *chasm.NexusEndpointProcessor) *nexusLibrary { nexus_library.go
15 > return &nexusLibrary{config: config, nexusProcessor: nexusProcessor}
16 > }
17
18 > func (l *nexusLibrary) CommandHandlers() map[enumspb.CommandType]CommandHandler { nexus_library.go
19 > h := &nexusCommandHandler{config: l.config, nexusProcessor: l.nexusProcessor}
20 > return map[enumspb.CommandType]CommandHandler{
21 > enumspb.COMMAND_TYPE_SCHEDULE_NEXUS_OPERATION: h.handleScheduleCommand,
22 > enumspb.COMMAND_TYPE_REQUEST_CANCEL_NEXUS_OPERATION: h.handleCancelCommand,
23 > }
24 > }
25
26 > func (l *nexusLibrary) EventDefinitions() []EventDefinition { nexus_library.go
27 > return []EventDefinition{
28 > ScheduledEventDefinition{},
29 > CancelRequestedEventDefinition{},
30 > CancelRequestCompletedEventDefinition{},
31 > CancelRequestFailedEventDefinition{},
32 > StartedEventDefinition{},
33 > CompletedEventDefinition{},
34 > FailedEventDefinition{},
35 > CanceledEventDefinition{},
36 > TimedOutEventDefinition{},
37 > }
38 > }