spec.go ×11

Frontier kind: Joint frontier

unlabeled · c_f1679f7017de

1 test · 2565 LOC · 120 files · introduces 1 test · 23 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
11 ranges23 lines · 1 files
Tests
1 test

Contains — complete concept membership

All code (extent)
435 ranges2565 lines · 120 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.

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

go.temporal.io/server/service/worker/scheduler/spec.go 23 introduced LOC · 11 ranges

Open complete file

174 }
175 if cronTZ != unset && tz != cronTZ {
176 > // all cron strings must agree on timezone (whether present or not) spec.go
177 > return nil, errConflictingTimezoneNames
178 > }
179 cronTZ = tz
180 if structured != nil {
182 }
183 if interval != nil {
184 > spec.Interval = append(spec.Interval, interval) spec.go
185 > }
186 }
187 spec.CronString = nil
190 // if cron string timezone is empty string, don't copy, let the one in spec be used.
191 if cronTZ != unset && cronTZ != "" {
192 > if spec.TimezoneName != "" && spec.TimezoneName != cronTZ || spec.TimezoneData != nil { spec.go
193 > return nil, errConflictingTimezoneNames
194 > } else if spec.TimezoneName == "" {
195 spec.TimezoneName = cronTZ
196 }
200 for _, structured := range spec.StructuredCalendar {
201 if err := validateStructuredCalendar(structured); err != nil {
202 > return nil, err spec.go
203 > }
204 }
205
207 for _, interval := range spec.Interval {
208 if err := validateInterval(interval); err != nil {
209 > return nil, err spec.go
210 > }
211 }
212
224 }
225 if r.Start < minVal || r.Start > maxVal {
226 > errs = append(errs, fmt.Sprintf("%s Start is not in range [%d-%d]", field, minVal, maxVal)) spec.go
227 > }
228 if r.End != 0 && (r.End < r.Start || r.End > maxVal) {
229 > errs = append(errs, fmt.Sprintf("%s End is before Start or not in range [%d-%d]", field, minVal, maxVal)) spec.go
230 > }
231 if r.Step < 0 {
232 > errs = append(errs, fmt.Sprintf("%s has invalid Step", field)) spec.go
233 > }
234 }
235 }
248
249 if len(errs) > 0 {
250 > return errors.New("invalid calendar spec: " + strings.Join(errs, ", ")) spec.go
251 > }
252 return nil
253 }
261 iv, phase := timestamp.DurationValue(i.Interval), timestamp.DurationValue(i.Phase)
262 if iv < time.Second {
263 > return errors.New("interval is too small") spec.go
264 } else if phase < 0 {
265 return errors.New("phase is negative")
266 } else if phase >= iv {
267 > return errors.New("phase cannot be greater than Interval") spec.go
268 > }
269 return nil
270 }