ClampSummaryCount converts an internal count to the compact Summary count representation.
(count int)
| 565 | |
| 566 | // ClampSummaryCount converts an internal count to the compact Summary count representation. |
| 567 | func ClampSummaryCount(count int) int32 { |
| 568 | switch { |
| 569 | case count <= 0: |
| 570 | return 0 |
| 571 | case count > int(maxSummaryCount): |
| 572 | return maxSummaryCount |
| 573 | default: |
| 574 | return int32(count) |
| 575 | } |
| 576 | } |
| 577 | |
| 578 | // Reference is the human-meaningful task identity used in enriched read models. |
| 579 | type Reference struct { |
no outgoing calls
no test coverage detected