Leave zot repositories in a consistent state after zot hits fd limit closes #359

Signed-off-by: Alexei Dodon <adodon@cisco.com>
This commit is contained in:
Alexei Dodon
2022-01-23 22:26:02 +02:00
committed by Ramkumar Chinchani
parent ba41368469
commit ad519e2d3e
7 changed files with 633 additions and 33 deletions
+7
View File
@@ -34,6 +34,7 @@ const (
UNAUTHORIZED
DENIED
UNSUPPORTED
INVALID_INDEX
)
func (e ErrorCode) String() string {
@@ -53,6 +54,7 @@ func (e ErrorCode) String() string {
UNAUTHORIZED: "UNAUTHORIZED",
DENIED: "DENIED",
UNSUPPORTED: "UNSUPPORTED",
INVALID_INDEX: "INVALID_INDEX",
}
return errMap[e]
@@ -152,6 +154,11 @@ func NewError(code ErrorCode, detail ...interface{}) Error { //nolint: interface
Description: `The operation was unsupported due to a missing
implementation or invalid set of parameters.`,
},
INVALID_INDEX: {
Message: "Invalid format of index.json file of the repo",
Description: "index.json file does not contain data in json format",
},
}
err, ok := errMap[code]