本文整理匯總了Golang中github.com/cloudfoundry/storeadapter.StoreAdapter.Update方法的典型用法代碼示例。如果您正苦於以下問題:Golang StoreAdapter.Update方法的具體用法?Golang StoreAdapter.Update怎麽用?Golang StoreAdapter.Update使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/cloudfoundry/storeadapter.StoreAdapter
的用法示例。
在下文中一共展示了StoreAdapter.Update方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1:
}
testUpdateFinder := func(updatedAddress map[string]string) func() {
return func() {
Context("when a service exists", func() {
JustBeforeEach(func() {
err := storeAdapter.Create(node)
Expect(err).NotTo(HaveOccurred())
finder.Start()
Eventually(finder.AllServers).ShouldNot(HaveLen(0))
Expect(finder.PreferredServers()).NotTo(HaveLen(0))
})
It("updates the service", func() {
err := storeAdapter.Update(updateNode)
Expect(err).NotTo(HaveOccurred())
Eventually(finder.AllServers).Should(Equal(updatedAddress))
Expect(getCallbackCount()).To(Equal(2))
Expect(finder.PreferredServers()).To(Equal(updatedAddress))
Expect(getPreferredCount()).To(Equal(2))
})
})
}
}
testFinder := func(expectedAddress map[string]string) func() {
return func() {
Context("when a service is created", func() {
Context("before dopplerservice begins", func() {