本文整理汇总了Golang中github.com/cloudfoundry-incubator/lattice/ltc/app_runner.AppRunner.SubmitLrp方法的典型用法代码示例。如果您正苦于以下问题:Golang AppRunner.SubmitLrp方法的具体用法?Golang AppRunner.SubmitLrp怎么用?Golang AppRunner.SubmitLrp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/cloudfoundry-incubator/lattice/ltc/app_runner.AppRunner
的用法示例。
在下文中一共展示了AppRunner.SubmitLrp方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1:
Args: []string{"app", "arg1", "--app", "arg 2"},
Dir: "/user/web/myappdir",
User: "zcap",
},
Monitor: &models.RunAction{
Path: "/tmp/healthcheck",
Args: []string{"-port", "2000"},
LogSource: "HEALTH",
User: "zcap",
},
}
lrpJson, err := json.Marshal(desiredLRP)
Expect(err).NotTo(HaveOccurred())
lrpName, err := appRunner.SubmitLrp(lrpJson)
Expect(err).NotTo(HaveOccurred())
Expect(lrpName).To(Equal("americano-app"))
Expect(fakeReceptorClient.UpsertDomainCallCount()).To(Equal(1))
domain, ttl := fakeReceptorClient.UpsertDomainArgsForCall(0)
Expect(domain).To(Equal("lattice"))
Expect(ttl).To(BeZero())
Expect(fakeReceptorClient.CreateDesiredLRPCallCount()).To(Equal(1))
Expect(fakeReceptorClient.CreateDesiredLRPArgsForCall(0)).To(Equal(desiredLRP))
})
It("returns errors if the app is already desired", func() {
desiredLRPs := []receptor.DesiredLRPResponse{
{ProcessGuid: "app-already-desired", Instances: 1},