本文整理汇总了Golang中github.com/cloudfoundry/cli/cf/models.AppInstanceFields类的典型用法代码示例。如果您正苦于以下问题:Golang AppInstanceFields类的具体用法?Golang AppInstanceFields怎么用?Golang AppInstanceFields使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了AppInstanceFields类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Golang代码示例。
示例1:
defaultAppForStart = models.Application{}
defaultAppForStart.Name = "my-app"
defaultAppForStart.Guid = "my-app-guid"
defaultAppForStart.InstanceCount = 2
defaultAppForStart.PackageState = "STAGED"
domain := models.DomainFields{}
domain.Name = "example.com"
route := models.RouteSummary{}
route.Host = "my-app"
route.Domain = domain
defaultAppForStart.Routes = []models.RouteSummary{route}
instance1 := models.AppInstanceFields{}
instance1.State = models.InstanceStarting
instance2 := models.AppInstanceFields{}
instance2.State = models.InstanceStarting
instance3 := models.AppInstanceFields{}
instance3.State = models.InstanceRunning
instance4 := models.AppInstanceFields{}
instance4.State = models.InstanceStarting
defaultInstanceResponses = [][]models.AppInstanceFields{
[]models.AppInstanceFields{instance1, instance2},
[]models.AppInstanceFields{instance1, instance2},
[]models.AppInstanceFields{instance3, instance4},
开发者ID:rbramwell,项目名称:cli,代码行数:31,代码来源:start_test.go
示例2:
requirementsFactory = &testreq.FakeReqFactory{}
defaultAppForStart.Name = "my-app"
defaultAppForStart.Guid = "my-app-guid"
defaultAppForStart.InstanceCount = 2
domain := models.DomainFields{}
domain.Name = "example.com"
route := models.RouteSummary{}
route.Host = "my-app"
route.Domain = domain
defaultAppForStart.Routes = []models.RouteSummary{route}
instance1 := models.AppInstanceFields{}
instance1.State = models.InstanceStarting
instance2 := models.AppInstanceFields{}
instance2.State = models.InstanceStarting
instance3 := models.AppInstanceFields{}
instance3.State = models.InstanceRunning
instance4 := models.AppInstanceFields{}
instance4.State = models.InstanceStarting
defaultInstanceReponses = [][]models.AppInstanceFields{
[]models.AppInstanceFields{instance1, instance2},
[]models.AppInstanceFields{instance1, instance2},
[]models.AppInstanceFields{instance3, instance4},
开发者ID:GABONIA,项目名称:cli,代码行数:31,代码来源:start_test.go
注:本文中的github.com/cloudfoundry/cli/cf/models.AppInstanceFields类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论