task_queue_commands.go ×12

Frontier kind: Joint frontier

unlabeled · c_d95f94500a90

1 test · 3420 LOC · 142 files · introduces 1 test · 75 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
14 ranges75 lines · 3 files
Tests
1 test

Contains — complete concept membership

All code (extent)
480 ranges3420 lines · 142 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.

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

go.temporal.io/server/tools/tdbg/task_queue_commands.go 64 introduced LOC · 12 ranges

Open complete file

93
94 // AdminDescribeTaskQueuePartition displays task queue partition information
95 > func AdminDescribeTaskQueuePartition(c *cli.Context, clientFactory ClientFactory) error { task_queue_commands.go
96 > // extracting the namespace
97 > namespace, err := getRequiredOption(c, FlagNamespace)
98 > if err != nil {
99 return err
100 }
101
102 // extracting the task queue name
103 > tqName, err := getRequiredOption(c, FlagTaskQueue) task_queue_commands.go
104 > if err != nil {
105 return err
106 }
107
108 // extracting the task queue type
109 > tqTypeString, err := getRequiredOption(c, FlagTaskQueueType) task_queue_commands.go
110 > if err != nil {
111 return err
112 }
113
114 > tlTypeInt, err := StringToEnum(tqTypeString, enumspb.TaskQueueType_value) task_queue_commands.go
115 > if err != nil {
116 > return fmt.Errorf("invalid task queue type: %w", err)
117 > }
118 > tqType := enumspb.TaskQueueType(tlTypeInt)
119 > if tqType == enumspb.TASK_QUEUE_TYPE_UNSPECIFIED {
120 > return errors.New("invalid task queue type") // nolint
121 > }
122
123 // extracting the task queue partition id
124 > partitionID := 0 task_queue_commands.go
125 > if c.IsSet(FlagPartitionID) {
126 > partitionID = c.Int(FlagPartitionID)
127 > }
128
129 // extracting the task queue partition sticky name
130 > stickyName := "" task_queue_commands.go
131 > if c.IsSet(FlagStickyName) {
132 > stickyName = c.String(FlagStickyName)
133 > }
134
135 // extracting the task queue partition buildId's
136 > buildIDs := make([]string, 0) task_queue_commands.go
137 > if c.IsSet(FlagBuildIDs) {
138 > buildIDs = c.StringSlice(FlagBuildIDs)
139 > }
140
141 // extracting the unversioned flag
142 > unversioned := true task_queue_commands.go
143 > if c.IsSet(FlagUnversioned) {
144 > unversioned = c.Bool(FlagUnversioned)
145 > }
146
147 // extracting the allActive flag
148 > allActive := true task_queue_commands.go
149 > if c.IsSet(FlagAllActive) {
150 > allActive = c.Bool(FlagAllActive)
151 > }
152
153 > tqPartition := &taskqueuespb.TaskQueuePartition{ task_queue_commands.go
154 > TaskQueue: tqName,
155 > TaskQueueType: tqType,
156 > }
157 > if stickyName != "" {
158 > tqPartition.PartitionId = &taskqueuespb.TaskQueuePartition_StickyName{StickyName: stickyName}
159 > } else {
160 > tqPartition.PartitionId = &taskqueuespb.TaskQueuePartition_NormalPartitionId{NormalPartitionId: int32(partitionID)}
161 > }
162
163 > client := clientFactory.AdminClient(c) task_queue_commands.go
164 > req := &adminservice.DescribeTaskQueuePartitionRequest{
165 > Namespace: namespace,
166 > TaskQueuePartition: tqPartition,
167 > BuildIds: &taskqueuepb.TaskQueueVersionSelection{
168 > BuildIds: buildIDs,
169 > Unversioned: unversioned,
170 > AllActive: allActive,
171 > },
172 > }
173 >
174 > ctx, cancel := newContext(c)
175 > defer cancel()
176 > if response, e := client.DescribeTaskQueuePartition(ctx, req); e != nil {
177 return fmt.Errorf("unable to describe Task Queue Partition: %w", e)
178 > } else { task_queue_commands.go
179 > prettyPrintJSONObject(c, response)
180 >
181 > }
182 > return nil
183 }
184
go.temporal.io/server/api/adminservice/v1/request_response.pb.go 8 introduced LOC · 1 range

Open complete file

5238 func (*DescribeTaskQueuePartitionResponse) ProtoMessage() {}
5239
5240 > func (x *DescribeTaskQueuePartitionResponse) ProtoReflect() protoreflect.Message { request_response.pb.go
5241 > mi := &file_temporal_server_api_adminservice_v1_request_response_proto_msgTypes[85]
5242 > if x != nil {
5243 > ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
5244 > if ms.LoadMessageInfo() == nil {
5245 > ms.StoreMessageInfo(mi)
5246 > }
5247 > return ms
5248 }
5249 return mi.MessageOf(x)
go.temporal.io/server/tools/tdbg/tdbg_commands.go 3 introduced LOC · 1 range

Open complete file

681 },
682 },
683 > Action: func(c *cli.Context) error { tdbg_commands.go
684 > return AdminDescribeTaskQueuePartition(c, clientFactory)
685 > },
686 },
687 {