本文整理汇总了Golang中github.com/cloudfoundry/bosh-agent/jobsupervisor/monit/fakes.FakeMonitClient类的典型用法代码示例。如果您正苦于以下问题:Golang FakeMonitClient类的具体用法?Golang FakeMonitClient怎么用?Golang FakeMonitClient使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了FakeMonitClient类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1:
boshalert "github.com/cloudfoundry/bosh-agent/agent/alert"
. "github.com/cloudfoundry/bosh-agent/jobsupervisor"
boshmonit "github.com/cloudfoundry/bosh-agent/jobsupervisor/monit"
fakemonit "github.com/cloudfoundry/bosh-agent/jobsupervisor/monit/fakes"
boshdir "github.com/cloudfoundry/bosh-agent/settings/directories"
boshlog "github.com/cloudfoundry/bosh-utils/logger"
fakesys "github.com/cloudfoundry/bosh-utils/system/fakes"
)
var _ = Describe("monitJobSupervisor", func() {
var (
fs *fakesys.FakeFileSystem
runner *fakesys.FakeCmdRunner
client *fakemonit.FakeMonitClient
logger boshlog.Logger
dirProvider boshdir.Provider
jobFailuresServerPort int
monit JobSupervisor
timeService *fakeclock.FakeClock
)
var jobFailureServerPort = 5000
getJobFailureServerPort := func() int {
jobFailureServerPort++
return jobFailureServerPort
}
BeforeEach(func() {
fs = fakesys.NewFakeFileSystem()
runner = fakesys.NewFakeCmdRunner()
示例2:
boshalert "github.com/cloudfoundry/bosh-agent/agent/alert"
. "github.com/cloudfoundry/bosh-agent/jobsupervisor"
boshmonit "github.com/cloudfoundry/bosh-agent/jobsupervisor/monit"
fakemonit "github.com/cloudfoundry/bosh-agent/jobsupervisor/monit/fakes"
boshlog "github.com/cloudfoundry/bosh-agent/logger"
boshdir "github.com/cloudfoundry/bosh-agent/settings/directories"
fakesys "github.com/cloudfoundry/bosh-agent/system/fakes"
)
var _ = Describe("monitJobSupervisor", func() {
var (
fs *fakesys.FakeFileSystem
runner *fakesys.FakeCmdRunner
client *fakemonit.FakeMonitClient
logger boshlog.Logger
dirProvider boshdir.DirectoriesProvider
jobFailuresServerPort int
monit JobSupervisor
)
var jobFailureServerPort = 5000
getJobFailureServerPort := func() int {
jobFailureServerPort++
return jobFailureServerPort
}
BeforeEach(func() {
fs = fakesys.NewFakeFileSystem()
runner = fakesys.NewFakeCmdRunner()