本文整理汇总了Golang中github.com/cloudfoundry/bosh-agent/settings/directories.Provider.JobsDir方法的典型用法代码示例。如果您正苦于以下问题:Golang Provider.JobsDir方法的具体用法?Golang Provider.JobsDir怎么用?Golang Provider.JobsDir使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类github.com/cloudfoundry/bosh-agent/settings/directories.Provider
的用法示例。
在下文中一共展示了Provider.JobsDir方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: buildApplierAndCompiler
func (app *app) buildApplierAndCompiler(
dirProvider boshdirs.Provider,
blobstore boshblob.Blobstore,
jobSupervisor boshjobsuper.JobSupervisor,
) (boshapplier.Applier, boshcomp.Compiler) {
jobsBc := boshbc.NewFileBundleCollection(
dirProvider.DataDir(),
dirProvider.BaseDir(),
"jobs",
app.platform.GetFs(),
app.logger,
)
packageApplierProvider := boshap.NewCompiledPackageApplierProvider(
dirProvider.DataDir(),
dirProvider.BaseDir(),
dirProvider.JobsDir(),
"packages",
blobstore,
app.platform.GetCompressor(),
app.platform.GetFs(),
app.logger,
)
jobApplier := boshaj.NewRenderedJobApplier(
jobsBc,
jobSupervisor,
packageApplierProvider,
blobstore,
app.platform.GetCompressor(),
app.platform.GetFs(),
app.logger,
)
applier := boshapplier.NewConcreteApplier(
jobApplier,
packageApplierProvider.Root(),
app.platform,
jobSupervisor,
dirProvider,
)
platformRunner := app.platform.GetRunner()
fileSystem := app.platform.GetFs()
cmdRunner := boshrunner.NewFileLoggingCmdRunner(
fileSystem,
platformRunner,
dirProvider.LogsDir(),
10*1024, // 10 Kb
)
compiler := boshcomp.NewConcreteCompiler(
app.platform.GetCompressor(),
blobstore,
fileSystem,
cmdRunner,
dirProvider,
packageApplierProvider.Root(),
packageApplierProvider.RootBundleCollection(),
)
return applier, compiler
}