component.go ×4

Frontier kind: Code frontier

unlabeled · c_11677441a054

10 tests · 3432 LOC · 136 files · introduces 0 tests · 41 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges41 lines · 3 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
724 ranges3432 lines · 136 files · Browse complete extent
All tests (intent)
10 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.

3 files ranked by introduced lines: 41 introduced LOC across 8 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/chasm/lib/callback/tasks.go 27 introduced LOC · 3 ranges

Open complete file

114 taskAttr chasm.TaskAttributes,
115 task *callbackspb.InvocationTask,
116 > ) error { tasks.go
117 > ns, err := h.namespaceRegistry.GetNamespaceByID(namespace.ID(ref.NamespaceID))
118 > if err != nil {
119 return fmt.Errorf("failed to get namespace by ID: %w", err)
120 }
121
122 > invokable, err := chasm.ReadComponent( tasks.go
123 > ctx,
124 > ref,
125 > (*Callback).loadInvocationArgs,
126 > nil,
127 > )
128 > if err != nil {
129 return err
130 }
131
132 > callCtx, cancel := context.WithTimeout( tasks.go
133 > ctx,
134 > h.config.RequestTimeout(ns.Name().String(), taskAttr.Destination),
135 > )
136 > defer cancel()
137 >
138 > result := invokable.Invoke(callCtx, ns, h, task, taskAttr)
139 > _, _, saveErr := chasm.UpdateComponent(
140 > ctx,
141 > ref,
142 > (*Callback).saveResult,
143 > saveResultInput{
144 > result: result,
145 > retryPolicy: h.config.RetryPolicy(),
146 > },
147 > )
148 > return invokable.WrapError(result, saveErr)
149 }
150
go.temporal.io/server/chasm/lib/callback/component.go 10 introduced LOC · 4 ranges

Open complete file

79 ctx chasm.Context,
80 _ chasm.NoValue,
81 > ) (invocable, error) { component.go
82 > target := c.CompletionSource.Get(ctx)
83 >
84 > completion, err := target.GetNexusCompletion(ctx, c.RequestId)
85 > if err != nil {
86 return nil, err
87 }
88
89 > callback := c.GetCallback().GetNexus() component.go
90 > if callback == nil {
91 return nil, queueserrors.NewUnprocessableTaskError(
92 fmt.Sprintf("unprocessable callback variant: %v", callback),
94 }
95
96 > if callback.Url == chasm.NexusCompletionHandlerURL { component.go
97 return invocableInternal{
98 callback: callback,
119 ctx chasm.MutableContext,
120 input saveResultInput,
121 > ) (chasm.NoValue, error) { component.go
122 > switch r := input.result.(type) {
123 case invocationResultOK:
124 err := TransitionSucceeded.Apply(c, ctx, EventSucceeded{Time: ctx.Now(c)})
go.temporal.io/server/chasm/lib/callback/gen/callbackpb/v1/message.pb.go 4 introduced LOC · 1 range

Open complete file

162 }
163
164 > func (x *CallbackState) GetCallback() *Callback { message.pb.go
165 > if x != nil {
166 > return x.Callback
167 > }
168 return nil
169 }