本文整理匯總了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()