summaryrefslogtreecommitdiffstats
path: root/certServiceK8sExternalProvider/src/exit_code.go
diff options
context:
space:
mode:
Diffstat (limited to 'certServiceK8sExternalProvider/src/exit_code.go')
-rw-r--r--certServiceK8sExternalProvider/src/exit_code.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/certServiceK8sExternalProvider/src/exit_code.go b/certServiceK8sExternalProvider/src/exit_code.go
new file mode 100644
index 00000000..dea56c83
--- /dev/null
+++ b/certServiceK8sExternalProvider/src/exit_code.go
@@ -0,0 +1,20 @@
+package app
+
+type ExitCode struct {
+ Code int
+ Message string
+}
+
+func newExitCode(code int, message string) *ExitCode{
+ exitCode := new (ExitCode)
+ exitCode.Code = code
+ exitCode.Message = message
+ return exitCode
+}
+
+var (
+ FAILED_TO_CREATE_CONTROLLER_MANAGER = ExitCode{1, "unable to create k8s controller manager"}
+ FAILED_TO_REGISTER_CMPv2_ISSUER_CONTROLLER = ExitCode{2, "unable to register CMPv2Issuer controller"}
+ FAILED_TO_REGISTER_CERT_REQUEST_CONTROLLER = ExitCode{3, "unable to register CertificateRequestController"}
+ EXCEPTION_WHILE_RUNNING_CONTROLLER_MANAGER = ExitCode{4, "an exception occurs while running k8s controller manager"}
+)