本文整理匯總了Golang中github.com/cloudfoundry/hm9000/config.Config.MaximumBackoffDelay方法的典型用法代碼示例。如果您正苦於以下問題:Golang Config.MaximumBackoffDelay方法的具體用法?Golang Config.MaximumBackoffDelay怎麽用?Golang Config.MaximumBackoffDelay使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/cloudfoundry/hm9000/config.Config
的用法示例。
在下文中一共展示了Config.MaximumBackoffDelay方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1:
store = NewStore(conf, storeAdapter, fakelogger.NewFakeLogger())
})
AfterEach(func() {
storeAdapter.Disconnect()
})
Describe("Saving crash state", func() {
BeforeEach(func() {
err := store.SaveCrashCounts(crashCount1, crashCount2)
Ω(err).ShouldNot(HaveOccurred())
})
It("stores the passed in crash state", func() {
expectedTTL := uint64(conf.MaximumBackoffDelay().Seconds()) * 2
node, err := storeAdapter.Get("/hm/v1/apps/crashes/" + crashCount1.AppGuid + "," + crashCount1.AppVersion + "/1")
Ω(err).ShouldNot(HaveOccurred())
Ω(node).Should(Equal(storeadapter.StoreNode{
Key: "/hm/v1/apps/crashes/" + crashCount1.AppGuid + "," + crashCount1.AppVersion + "/1",
Value: crashCount1.ToJSON(),
TTL: expectedTTL,
}))
node, err = storeAdapter.Get("/hm/v1/apps/crashes/" + crashCount2.AppGuid + "," + crashCount2.AppVersion + "/4")
Ω(err).ShouldNot(HaveOccurred())
Ω(node).Should(Equal(storeadapter.StoreNode{
Key: "/hm/v1/apps/crashes/" + crashCount2.AppGuid + "," + crashCount2.AppVersion + "/4",
Value: crashCount2.ToJSON(),
TTL: expectedTTL,