String returns a short lowercase label suitable for logs and metrics.
()
| 21 | |
| 22 | // String returns a short lowercase label suitable for logs and metrics. |
| 23 | func (s Status) String() string { |
| 24 | switch s { |
| 25 | case StatusOK: |
| 26 | return "ok" |
| 27 | case StatusError: |
| 28 | return "error" |
| 29 | case StatusPanicked: |
| 30 | return "panicked" |
| 31 | case StatusHung: |
| 32 | return "hung" |
| 33 | case StatusMemCap: |
| 34 | return "mem_cap" |
| 35 | case StatusCanceled: |
| 36 | return "canceled" |
| 37 | default: |
| 38 | return "unknown" |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | // Result is returned from Supervisor.Run. Callers use it to decide what |
| 43 | // to do with the connection next: a clean StatusOK / StatusError lets |
no outgoing calls
no test coverage detected