Documentation ¶
Index ¶
- type Adapter
- type AdvancedStatefulSetAdapter
- func (a *AdvancedStatefulSetAdapter) ApplySubsetTemplate(ud *alpha1.UnitedDeployment, subsetName, revision string, ...) error
- func (a *AdvancedStatefulSetAdapter) ConvertToResourceList(obj runtime.Object) []metav1.Object
- func (a *AdvancedStatefulSetAdapter) GetObjectMeta(obj metav1.Object) *metav1.ObjectMeta
- func (a *AdvancedStatefulSetAdapter) GetReplicaDetails(obj metav1.Object, updatedRevision string) (specReplicas, specPartition *int32, ...)
- func (a *AdvancedStatefulSetAdapter) GetStatusObservedGeneration(obj metav1.Object) int64
- func (a *AdvancedStatefulSetAdapter) GetSubsetFailure() *string
- func (a *AdvancedStatefulSetAdapter) IsExpected(obj metav1.Object, revision string) bool
- func (a *AdvancedStatefulSetAdapter) NewResourceListObject() runtime.Object
- func (a *AdvancedStatefulSetAdapter) NewResourceObject() runtime.Object
- func (a *AdvancedStatefulSetAdapter) PostUpdate(ud *alpha1.UnitedDeployment, obj runtime.Object, revision string, ...) error
- type StatefulSetAdapter
- func (a *StatefulSetAdapter) ApplySubsetTemplate(ud *alpha1.UnitedDeployment, subsetName, revision string, ...) error
- func (a *StatefulSetAdapter) GetReplicaDetails(obj metav1.Object, updatedRevision string) (specReplicas, specPartition *int32, ...)
- func (a *StatefulSetAdapter) GetStatusObservedGeneration(obj metav1.Object) int64
- func (a *StatefulSetAdapter) GetSubsetFailure() *string
- func (a *StatefulSetAdapter) IsExpected(obj metav1.Object, revision string) bool
- func (a *StatefulSetAdapter) NewResourceListObject() runtime.Object
- func (a *StatefulSetAdapter) NewResourceObject() runtime.Object
- func (a *StatefulSetAdapter) PostUpdate(ud *alpha1.UnitedDeployment, obj runtime.Object, revision string, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter interface { // NewResourceObject creates a empty subset object. NewResourceObject() runtime.Object // NewResourceListObject creates a empty subset list object. NewResourceListObject() runtime.Object // GetStatusObservedGeneration returns the observed generation of the subset. GetStatusObservedGeneration(subset metav1.Object) int64 // GetReplicaDetails returns the replicas information of the subset status. GetReplicaDetails(subset metav1.Object, updatedRevision string) (specReplicas, specPartition *int32, statusReplicas, statusReadyReplicas, statusUpdatedReplicas, statusUpdatedReadyReplicas int32, err error) // GetSubsetFailure returns failure information of the subset. GetSubsetFailure() *string // ApplySubsetTemplate updates the subset to the latest revision. ApplySubsetTemplate(ud *alpha1.UnitedDeployment, subsetName, revision string, replicas, partition int32, subset runtime.Object) error // IsExpected checks the subset is the expected revision or not. // If not, UnitedDeployment will call ApplySubsetTemplate to update it. IsExpected(subset metav1.Object, revision string) bool // PostUpdate does some works after subset updated PostUpdate(ud *alpha1.UnitedDeployment, subset runtime.Object, revision string, partition int32) error }
type AdvancedStatefulSetAdapter ¶
func (*AdvancedStatefulSetAdapter) ApplySubsetTemplate ¶
func (a *AdvancedStatefulSetAdapter) ApplySubsetTemplate(ud *alpha1.UnitedDeployment, subsetName, revision string, replicas, partition int32, obj runtime.Object) error
ApplySubsetTemplate updates the subset to the latest revision, depending on the AdvancedStatefulSetTemplate.
func (*AdvancedStatefulSetAdapter) ConvertToResourceList ¶
func (a *AdvancedStatefulSetAdapter) ConvertToResourceList(obj runtime.Object) []metav1.Object
ConvertToResourceList converts AdvancedStatefulSetList object to AdvancedStatefulSet array.
func (*AdvancedStatefulSetAdapter) GetObjectMeta ¶
func (a *AdvancedStatefulSetAdapter) GetObjectMeta(obj metav1.Object) *metav1.ObjectMeta
GetObjectMeta returns the ObjectMeta of the subset of AdvancedStatefulSet.
func (*AdvancedStatefulSetAdapter) GetReplicaDetails ¶
func (a *AdvancedStatefulSetAdapter) GetReplicaDetails(obj metav1.Object, updatedRevision string) (specReplicas, specPartition *int32, statusReplicas, statusReadyReplicas, statusUpdatedReplicas, statusUpdatedReadyReplicas int32, err error)
GetReplicaDetails returns the replicas detail the subset needs.
func (*AdvancedStatefulSetAdapter) GetStatusObservedGeneration ¶
func (a *AdvancedStatefulSetAdapter) GetStatusObservedGeneration(obj metav1.Object) int64
GetStatusObservedGeneration returns the observed generation of the subset.
func (*AdvancedStatefulSetAdapter) GetSubsetFailure ¶
func (a *AdvancedStatefulSetAdapter) GetSubsetFailure() *string
GetSubsetFailure returns the failure information of the subset. AdvancedStatefulSet has no condition.
func (*AdvancedStatefulSetAdapter) IsExpected ¶
func (a *AdvancedStatefulSetAdapter) IsExpected(obj metav1.Object, revision string) bool
IsExpected checks the subset is the expected revision or not. The revision label can tell the current subset revision.
func (*AdvancedStatefulSetAdapter) NewResourceListObject ¶
func (a *AdvancedStatefulSetAdapter) NewResourceListObject() runtime.Object
NewResourceListObject creates a empty AdvancedStatefulSet object.
func (*AdvancedStatefulSetAdapter) NewResourceObject ¶
func (a *AdvancedStatefulSetAdapter) NewResourceObject() runtime.Object
NewResourceObject creates a empty AdvancedStatefulSet object.
func (*AdvancedStatefulSetAdapter) PostUpdate ¶
func (a *AdvancedStatefulSetAdapter) PostUpdate(ud *alpha1.UnitedDeployment, obj runtime.Object, revision string, partition int32) error
PostUpdate does some works after subset updated.
type StatefulSetAdapter ¶
func (*StatefulSetAdapter) ApplySubsetTemplate ¶
func (a *StatefulSetAdapter) ApplySubsetTemplate(ud *alpha1.UnitedDeployment, subsetName, revision string, replicas, partition int32, obj runtime.Object) error
ApplySubsetTemplate updates the subset to the latest revision, depending on the StatefulSetTemplate.
func (*StatefulSetAdapter) GetReplicaDetails ¶
func (a *StatefulSetAdapter) GetReplicaDetails(obj metav1.Object, updatedRevision string) (specReplicas, specPartition *int32, statusReplicas, statusReadyReplicas, statusUpdatedReplicas, statusUpdatedReadyReplicas int32, err error)
GetReplicaDetails returns the replicas detail the subset needs.
func (*StatefulSetAdapter) GetStatusObservedGeneration ¶
func (a *StatefulSetAdapter) GetStatusObservedGeneration(obj metav1.Object) int64
GetStatusObservedGeneration returns the observed generation of the subset.
func (*StatefulSetAdapter) GetSubsetFailure ¶
func (a *StatefulSetAdapter) GetSubsetFailure() *string
GetSubsetFailure returns the failure information of the subset. StatefulSet has no condition.
func (*StatefulSetAdapter) IsExpected ¶
func (a *StatefulSetAdapter) IsExpected(obj metav1.Object, revision string) bool
IsExpected checks the subset is the expected revision or not. The revision label can tell the current subset revision.
func (*StatefulSetAdapter) NewResourceListObject ¶
func (a *StatefulSetAdapter) NewResourceListObject() runtime.Object
NewResourceListObject creates a empty StatefulSetList object.
func (*StatefulSetAdapter) NewResourceObject ¶
func (a *StatefulSetAdapter) NewResourceObject() runtime.Object
NewResourceObject creates a empty StatefulSet object.
func (*StatefulSetAdapter) PostUpdate ¶
func (a *StatefulSetAdapter) PostUpdate(ud *alpha1.UnitedDeployment, obj runtime.Object, revision string, partition int32) error
PostUpdate does some works after subset updated. StatefulSet will implement this method to clean stuck pods.