version_rule_helpers.go ×4

Frontier kind: Joint frontier

unlabeled · c_ee083a7ab845

1 test · 2731 LOC · 139 files · introduces 1 test · 41 LOC · 5 files

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges41 lines · 5 files
Tests
1 test

Contains — complete concept membership

All code (extent)
419 ranges2731 lines · 139 files · Browse complete extent
All tests (intent)
1 testBrowse 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.

1 test introduced at this concept.

Introduced code

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

5 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/service/matching/version_rule_helpers.go 27 introduced LOC · 4 ranges

Open complete file

300 versioningData *persistencespb.VersioningData,
301 clk *hlc.Clock,
302 > ) (*matchingservice.GetWorkerVersioningRulesResponse, error) { version_rule_helpers.go
303 > var cT []byte
304 > var err error
305 > if cT, err = clk.Marshal(); err != nil {
306 return nil, serviceerror.NewInternal("error generating conflict token")
307 }
308 > activeAssignmentRules := make([]*taskqueuepb.TimestampedBuildIdAssignmentRule, 0) version_rule_helpers.go
309 > for _, ar := range versioningData.GetAssignmentRules() {
310 > if ar.GetDeleteTimestamp() == nil {
311 > activeAssignmentRules = append(activeAssignmentRules, &taskqueuepb.TimestampedBuildIdAssignmentRule{
312 > Rule: ar.GetRule(),
313 > CreateTime: hlc.ProtoTimestamp(ar.GetCreateTimestamp()),
314 > })
315 > }
316 }
317 > activeRedirectRules := make([]*taskqueuepb.TimestampedCompatibleBuildIdRedirectRule, 0) version_rule_helpers.go
318 > for _, rr := range versioningData.GetRedirectRules() {
319 > if rr.GetDeleteTimestamp() == nil {
320 > activeRedirectRules = append(activeRedirectRules, &taskqueuepb.TimestampedCompatibleBuildIdRedirectRule{
321 > Rule: rr.GetRule(),
322 > CreateTime: hlc.ProtoTimestamp(rr.GetCreateTimestamp()),
323 > })
324 > }
325 }
326 > return &matchingservice.GetWorkerVersioningRulesResponse{ version_rule_helpers.go
327 > Response: &workflowservice.GetWorkerVersioningRulesResponse{
328 > AssignmentRules: activeAssignmentRules,
329 > CompatibleRedirectRules: activeRedirectRules,
330 > ConflictToken: cT,
331 > },
332 > }, nil
333 }
334
go.temporal.io/server/api/matchingservice/v1/request_response.pb.go 4 introduced LOC · 1 range

Open complete file

2528 }
2529
2530 > func (x *GetWorkerVersioningRulesResponse) GetResponse() *v1.GetWorkerVersioningRulesResponse { request_response.pb.go
2531 > if x != nil {
2532 > return x.Response
2533 > }
2534 return nil
2535 }
go.temporal.io/server/api/persistence/v1/task_queues.pb.go 4 introduced LOC · 1 range

Open complete file

299 }
300
301 > func (x *AssignmentRule) GetCreateTimestamp() *v1.HybridLogicalClock { task_queues.pb.go
302 > if x != nil {
303 > return x.CreateTimestamp
304 > }
305 return nil
306 }
go.temporal.io/server/api/clock/v1/message.go-helpers.pb.go 3 introduced LOC · 1 range

Open complete file

44
45 // Marshal an object of type HybridLogicalClock to the protobuf v3 wire format
46 > func (val *HybridLogicalClock) Marshal() ([]byte, error) { message.go-helpers.pb.go
47 > return proto.Marshal(val)
48 > }
49
50 // Unmarshal an object of type HybridLogicalClock from the protobuf v3 wire format
go.temporal.io/server/common/clock/hybrid_logical_clock/hybrid_logical_clock.go 3 introduced LOC · 1 range

Open complete file

98
99 // ProtoTimestamp returns timestamppb.New(UTC(c))
100 > func ProtoTimestamp(c *Clock) *timestamppb.Timestamp { hybrid_logical_clock.go
101 > return timestamppb.New(UTC(c))
102 > }