github.com/IBM-Blockchain/fabric-operator@v1.0.4/pkg/restart/restart_structs.go (about) 1 /* 2 * Copyright contributors to the Hyperledger Fabric Operator project 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 * 6 * Licensed under the Apache License, Version 2.0 (the "License"); 7 * you may not use this file except in compliance with the License. 8 * You may obtain a copy of the License at: 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, software 13 * distributed under the License is distributed on an "AS IS" BASIS, 14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 * See the License for the specific language governing permissions and 16 * limitations under the License. 17 */ 18 19 package restart 20 21 type Reason string 22 23 const ( 24 ADMINCERT Reason = "adminCert" 25 ECERTUPDATE Reason = "ecertUpdate" 26 TLSUPDATE Reason = "tlsUpdate" 27 CONFIGOVERRIDE Reason = "configOverride" 28 MIGRATION Reason = "migration" 29 NODEOU Reason = "nodeOU" 30 CONFIGMAPUPDATE Reason = "configMapUpdate" 31 RESTARTACTION Reason = "restartAction" 32 ) 33 34 type Status string 35 36 const ( 37 Pending Status = "pending" 38 Complete Status = "complete" 39 ) 40 41 type Request struct { 42 Status Status 43 RequestTimestamp string 44 LastActionTimestamp string 45 } 46 47 type Restart struct { 48 Requests map[Reason]*Request 49 } 50 51 // Config defines operator-config.BinaryData["restart-config.yaml"] 52 type Config struct { 53 Instances map[string]*Restart 54 }