-
Notifications
You must be signed in to change notification settings - Fork 17
/
data_structure.go
46 lines (39 loc) · 1.54 KB
/
data_structure.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package v1alpha1
type DataStructureSpec struct {
// Name of the data structure config to be created. If empty, CR name will be used.
// It cannot be updated after the config is created successfully.
// +optional
Name string `json:"name,omitempty"`
// HazelcastResourceName defines the name of the Hazelcast resource.
// +kubebuilder:validation:MinLength:=1
// +required
HazelcastResourceName string `json:"hazelcastResourceName"`
// Number of synchronous backups.
// +kubebuilder:validation:Minimum=0
// +kubebuilder:default:=1
// +optional
BackupCount *int32 `json:"backupCount,omitempty"`
// Number of asynchronous backups.
// +kubebuilder:validation:Minimum=0
// +kubebuilder:default:=0
// +optional
AsyncBackupCount int32 `json:"asyncBackupCount"`
}
type DataStructureStatus struct {
// +optional
State DataStructureConfigState `json:"state,omitempty"`
// +optional
Message string `json:"message,omitempty"`
// +optional
MemberStatuses map[string]DataStructureConfigState `json:"memberStatuses,omitempty"`
}
// +kubebuilder:validation:Enum=Success;Failed;Pending;Persisting;Terminating
type DataStructureConfigState string
const (
DataStructureFailed DataStructureConfigState = "Failed"
DataStructureSuccess DataStructureConfigState = "Success"
DataStructurePending DataStructureConfigState = "Pending"
// The config is added into all members but waiting for the config to be persisten into ConfigMap
DataStructurePersisting DataStructureConfigState = "Persisting"
DataStructureTerminating DataStructureConfigState = "Terminating"
)