Documentation
¶
Index ¶
- func CalculatePartitionReplicas(totalReplicas *int32, partition intstr.IntOrString) (int32, error)
- func CheckPartitionReady(status rolloutv1alpha1.RolloutWorkloadStatus, partiton int32) bool
- func GetClusterFromLabel(labels map[string]string) string
- type Info
- type Interface
- type Set
- type WorkloadMatcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalculatePartitionReplicas ¶
func CalculatePartitionReplicas(totalReplicas *int32, partition intstr.IntOrString) (int32, error)
func CheckPartitionReady ¶
func CheckPartitionReady(status rolloutv1alpha1.RolloutWorkloadStatus, partiton int32) bool
func GetClusterFromLabel ¶
Types ¶
type Info ¶
type Interface ¶
type Interface interface {
// GetInfo returns basic workload informations.
GetInfo() Info
// GetStatus returns current workload status
GetStatus() rolloutv1alpha1.RolloutWorkloadStatus
// IsWaitingRollout returns if the workload is waiting for rollout.
IsWaitingRollout() bool
// UpgradePartition upgrades the workload to the specified partition
// It should return true if the workload changed.
//
// NOTE: This function must be idempotent.
UpgradePartition(partition intstr.IntOrString) (bool, error)
// UpdateOnConflict try its best to updates the workload on conflict.
UpdateOnConflict(ctx context.Context, modifyFunc func(obj client.Object) error) error
}
Interface is the interface for workload
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
func NewWorkloadSet ¶
func (*Set) Matches ¶
func (s *Set) Matches(match *rolloutv1alpha1.ResourceMatch) []Interface
type WorkloadMatcher ¶
func MatchAsMatcher ¶
func MatchAsMatcher(match rolloutv1alpha1.ResourceMatch) WorkloadMatcher
Click to show internal directories.
Click to hide internal directories.