nexus_endpoint_store.go ×6

Frontier kind: Code frontier

unlabeled · c_3fa70d8940bd

5 tests · 3346 LOC · 156 files · introduces 0 tests · 21 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges21 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
524 ranges3346 lines · 156 files · Browse complete extent
All tests (intent)
5 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.

1 file ranked by introduced lines: 21 introduced LOC across 6 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/common/persistence/sql/nexus_endpoint_store.go 21 introduced LOC · 6 ranges

Open complete file

93 ctx context.Context,
94 request *p.GetNexusEndpointRequest,
95 > ) (*p.InternalNexusEndpoint, error) { nexus_endpoint_store.go
96 > id, err := primitives.ParseUUID(request.ID)
97 > if err != nil {
98 return nil, serviceerror.NewInternalf("unable to parse endpoint ID as UUID: %v", err)
99 }
100
101 > row, err := s.DB.GetNexusEndpointByID(ctx, id) nexus_endpoint_store.go
102 > if err != nil {
103 > if errors.Is(err, sql.ErrNoRows) {
104 > return nil, serviceerror.NewNotFoundf("Nexus endpoint with ID `%v` not found", request.ID)
105 > }
106 s.logger.Error(fmt.Sprintf("error getting Nexus endpoint with ID %v", request.ID), tag.Error(err))
107 return nil, serviceerror.NewUnavailable(err.Error())
108 }
109
110 > return &p.InternalNexusEndpoint{ nexus_endpoint_store.go
111 > ID: request.ID,
112 > Version: row.Version,
113 > Data: p.NewDataBlob(row.Data, row.DataEncoding),
114 > }, nil
115 }
116
121 lastID := emptyID
122 if len(request.NextPageToken) > 0 {
123 > token, err := deserializePageTokenJson[listEndpointsNextPageToken](request.NextPageToken) nexus_endpoint_store.go
124 > if err != nil {
125 return nil, err
126 }
127 > lastID = token.LastID nexus_endpoint_store.go
128 }
129
157 var nextPageToken []byte
158 if len(rows) > 0 && len(rows) == request.PageSize {
159 > // len(rows) could be zero when fetching just the table version. nexus_endpoint_store.go
160 > nextPageToken, retErr = serializePageTokenJson(&listEndpointsNextPageToken{
161 > LastID: rows[request.PageSize-1].ID,
162 > })
163 > if retErr != nil {
164 s.logger.Error("error serializing next page token during ListNexusEndpoints", tag.Error(retErr))
165 return nil, serviceerror.NewInternal(retErr.Error())