當前位置: 首頁>>代碼示例>>Golang>>正文


Golang api.DeploymentConfigStatus類代碼示例

本文整理匯總了Golang中github.com/openshift/origin/pkg/deploy/api.DeploymentConfigStatus的典型用法代碼示例。如果您正苦於以下問題:Golang DeploymentConfigStatus類的具體用法?Golang DeploymentConfigStatus怎麽用?Golang DeploymentConfigStatus使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了DeploymentConfigStatus類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。

示例1: autoConvert_v1_DeploymentConfigStatus_To_api_DeploymentConfigStatus

func autoConvert_v1_DeploymentConfigStatus_To_api_DeploymentConfigStatus(in *DeploymentConfigStatus, out *api.DeploymentConfigStatus, s conversion.Scope) error {
	out.LatestVersion = in.LatestVersion
	out.ObservedGeneration = in.ObservedGeneration
	out.Replicas = in.Replicas
	out.UpdatedReplicas = in.UpdatedReplicas
	out.AvailableReplicas = in.AvailableReplicas
	out.UnavailableReplicas = in.UnavailableReplicas
	if in.Details != nil {
		in, out := &in.Details, &out.Details
		*out = new(api.DeploymentDetails)
		if err := Convert_v1_DeploymentDetails_To_api_DeploymentDetails(*in, *out, s); err != nil {
			return err
		}
	} else {
		out.Details = nil
	}
	if in.Conditions != nil {
		in, out := &in.Conditions, &out.Conditions
		*out = make([]api.DeploymentCondition, len(*in))
		for i := range *in {
			if err := Convert_v1_DeploymentCondition_To_api_DeploymentCondition(&(*in)[i], &(*out)[i], s); err != nil {
				return err
			}
		}
	} else {
		out.Conditions = nil
	}
	return nil
}
開發者ID:juanluisvaladas,項目名稱:origin,代碼行數:29,代碼來源:zz_generated.conversion.go

示例2: autoConvert_v1_DeploymentConfigStatus_To_api_DeploymentConfigStatus

func autoConvert_v1_DeploymentConfigStatus_To_api_DeploymentConfigStatus(in *DeploymentConfigStatus, out *deploy_api.DeploymentConfigStatus, s conversion.Scope) error {
	out.LatestVersion = in.LatestVersion
	if in.Details != nil {
		in, out := &in.Details, &out.Details
		*out = new(deploy_api.DeploymentDetails)
		if err := Convert_v1_DeploymentDetails_To_api_DeploymentDetails(*in, *out, s); err != nil {
			return err
		}
	} else {
		out.Details = nil
	}
	out.ObservedGeneration = in.ObservedGeneration
	return nil
}
開發者ID:sgallagher,項目名稱:origin,代碼行數:14,代碼來源:conversion_generated.go

示例3: autoConvert_v1_DeploymentConfigStatus_To_api_DeploymentConfigStatus

func autoConvert_v1_DeploymentConfigStatus_To_api_DeploymentConfigStatus(in *DeploymentConfigStatus, out *deploy_api.DeploymentConfigStatus, s conversion.Scope) error {
	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
		defaulting.(func(*DeploymentConfigStatus))(in)
	}
	out.LatestVersion = in.LatestVersion
	if in.Details != nil {
		in, out := &in.Details, &out.Details
		*out = new(deploy_api.DeploymentDetails)
		if err := Convert_v1_DeploymentDetails_To_api_DeploymentDetails(*in, *out, s); err != nil {
			return err
		}
	} else {
		out.Details = nil
	}
	out.ObservedGeneration = in.ObservedGeneration
	return nil
}
開發者ID:RomainVabre,項目名稱:origin,代碼行數:17,代碼來源:conversion_generated.go

示例4: SetDeploymentCondition

// SetDeploymentCondition updates the deployment to include the provided condition. If the condition that
// we are about to add already exists and has the same status and reason then we are not going to update.
func SetDeploymentCondition(status *deployapi.DeploymentConfigStatus, condition deployapi.DeploymentCondition) {
	currentCond := GetDeploymentCondition(*status, condition.Type)
	if currentCond != nil && currentCond.Status == condition.Status && currentCond.Reason == condition.Reason {
		return
	}
	newConditions := filterOutCondition(status.Conditions, condition.Type)
	status.Conditions = append(newConditions, condition)
}
開發者ID:jayunit100,項目名稱:origin,代碼行數:10,代碼來源:util.go

示例5: SetDeploymentCondition

// SetDeploymentCondition updates the deployment to include the provided condition. If the condition that
// we are about to add already exists and has the same status and reason then we are not going to update.
func SetDeploymentCondition(status *deployapi.DeploymentConfigStatus, condition deployapi.DeploymentCondition) {
	currentCond := GetDeploymentCondition(*status, condition.Type)
	if currentCond != nil && currentCond.Status == condition.Status && currentCond.Reason == condition.Reason {
		return
	}
	// Preserve lastTransitionTime if we are not switching between statuses of a condition.
	if currentCond != nil && currentCond.Status == condition.Status {
		condition.LastTransitionTime = currentCond.LastTransitionTime
	}
	newConditions := filterOutCondition(status.Conditions, condition.Type)
	status.Conditions = append(newConditions, condition)
}
開發者ID:LalatenduMohanty,項目名稱:origin,代碼行數:14,代碼來源:util.go

示例6: RemoveDeploymentCondition

// RemoveDeploymentCondition removes the deployment condition with the provided type.
func RemoveDeploymentCondition(status *deployapi.DeploymentConfigStatus, condType deployapi.DeploymentConditionType) {
	status.Conditions = filterOutCondition(status.Conditions, condType)
}
開發者ID:LalatenduMohanty,項目名稱:origin,代碼行數:4,代碼來源:util.go

示例7: SetDeploymentCondition

// SetDeploymentCondition updates the deployment to include the provided condition.
func SetDeploymentCondition(status *deployapi.DeploymentConfigStatus, condition deployapi.DeploymentCondition) {
	newConditions := filterOutCondition(status.Conditions, condition.Type)
	status.Conditions = append(newConditions, condition)
}
開發者ID:rootfs,項目名稱:origin,代碼行數:5,代碼來源:util.go


注:本文中的github.com/openshift/origin/pkg/deploy/api.DeploymentConfigStatus類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。