executors.go ×12

Frontier kind: Code frontier

unlabeled · c_e45b1f8483ad

9 tests · 2901 LOC · 135 files · introduces 0 tests · 40 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
14 ranges40 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
488 ranges2901 lines · 135 files · Browse complete extent
All tests (intent)
9 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: 40 introduced LOC across 14 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/components/callbacks/executors.go 32 introduced LOC · 12 ranges

Open complete file

108 ref hsm.Ref,
109 task InvocationTask,
110 > ) error { executors.go
111 > ns, err := e.NamespaceRegistry.GetNamespaceByID(namespace.ID(ref.WorkflowKey.NamespaceID))
112 > if err != nil {
113 return fmt.Errorf("failed to get namespace by ID: %w", err)
114 }
115
116 > invokable, err := e.loadInvocationArgs(ctx, env, ref) executors.go
117 > if err != nil {
118 return err
119 }
120
121 > callCtx, cancel := context.WithTimeout( executors.go
122 > ctx,
123 > e.Config.RequestTimeout(ns.Name().String(), task.Destination()),
124 > )
125 > defer cancel()
126 >
127 > result := invokable.Invoke(callCtx, ns, e, task)
128 > saveErr := e.saveResult(ctx, env, ref, result)
129 > return invokable.WrapError(result, saveErr)
130 }
131
134 env hsm.Environment,
135 ref hsm.Ref,
136 > ) (invokable callbackInvokable, err error) { executors.go
137 > err = env.Access(ctx, ref, hsm.AccessRead, func(node *hsm.Node) error {
138 > callback, err := hsm.MachineData[Callback](node)
139 > if err != nil {
140 return err
141 }
142
143 > variant := callback.GetCallback().GetNexus() executors.go
144 > if variant == nil {
145 return queueserrors.NewUnprocessableTaskError(
146 fmt.Sprintf("unprocessable callback variant: %v", variant),
147 )
148 }
149 > target, err := hsm.MachineData[CanGetNexusCompletion](node.Parent) executors.go
150 > if err != nil {
151 return err
152 }
153
154 > completion, err := target.GetNexusCompletion(ctx, callback.GetRequestId()) executors.go
155 > if err != nil {
156 return err
157 }
159 // CHASM internal callbacks make use of Nexus as their callback delivery
160 // mechanism, but with the internal delivery URL.
161 > if variant.Url == chasm.NexusCompletionHandlerURL { executors.go
162 invokable = chasmInvocation{
163 nexus: variant,
166 requestID: callback.RequestId,
167 }
168 > } else { executors.go
169 invokable = nexusInvocation{
170 nexus: variant,
185 ref hsm.Ref,
186 result invocationResult,
187 > ) error { executors.go
188 > return env.Access(ctx, ref, hsm.AccessWrite, func(node *hsm.Node) error {
189 > return hsm.MachineTransition(node, func(callback Callback) (hsm.TransitionOutput, error) {
190 > switch result.(type) {
191 case invocationResultOK:
192 return TransitionSucceeded.Apply(callback, EventSucceeded{
go.temporal.io/server/api/persistence/v1/executions.pb.go 8 introduced LOC · 2 ranges

Open complete file

3949 }
3950
3951 > func (x *CallbackInfo) GetCallback() *Callback { executions.pb.go
3952 > if x != nil {
3953 > return x.Callback
3954 > }
3955 return nil
3956 }
4005 }
4006
4007 > func (x *CallbackInfo) GetRequestId() string { executions.pb.go
4008 > if x != nil {
4009 > return x.RequestId
4010 > }
4011 return ""
4012 }