Wei-Yu Chen | ad55cb8 | 2022-02-15 20:07:01 +0800 | [diff] [blame] | 1 | // SPDX-FileCopyrightText: 2020 The Magma Authors. |
| 2 | // SPDX-FileCopyrightText: 2022 Open Networking Foundation <support@opennetworking.org> |
| 3 | // |
| 4 | // SPDX-License-Identifier: BSD-3-Clause |
| 5 | |
| 6 | syntax = "proto3"; |
| 7 | |
| 8 | package magma.orc8r; |
| 9 | |
| 10 | option go_package = "magma/orc8r/lib/go/protos"; |
| 11 | |
| 12 | // -------------------------------------------------------------------------- |
| 13 | // Service exit status |
| 14 | // -------------------------------------------------------------------------- |
| 15 | |
| 16 | message ServiceExitStatus { |
| 17 | // ServiceResult enumeration as defined in service "result" by systemd |
| 18 | enum ServiceResult { |
| 19 | UNUSED = 0; |
| 20 | SUCCESS = 1; |
| 21 | PROTOCOL = 2; |
| 22 | TIMEOUT = 3; |
| 23 | EXIT_CODE = 4; |
| 24 | SIGNAL = 5; |
| 25 | CORE_DUMP = 6; |
| 26 | WATCHDOG = 7; |
| 27 | START_LIMIT_HIT = 8; |
| 28 | RESOURCES = 9; |
| 29 | } |
| 30 | ServiceResult latest_service_result = 1; |
| 31 | |
| 32 | // ExitCode enumeration as defined in service "result" by systemd |
| 33 | enum ExitCode { |
| 34 | UNUSED_EXIT_CODE = 0; |
| 35 | EXITED = 1; |
| 36 | KILLED = 2; |
| 37 | DUMPED = 3; |
| 38 | } |
| 39 | ExitCode latest_exit_code = 2; |
| 40 | |
| 41 | // Optional return code returned by the service during exit |
| 42 | uint32 latest_rc = 3; |
| 43 | |
| 44 | // Clean exit, e.g. SIGNKILL |
| 45 | uint32 num_clean_exits = 4; |
| 46 | // Unclean exit e.g. CORE_DUMP or non zero exit code. |
| 47 | uint32 num_fail_exits = 5; |
| 48 | } |