本文整理匯總了Golang中github.com/cloudfoundry/bosh-agent/settings/directories.Provider.BaseDir方法的典型用法代碼示例。如果您正苦於以下問題:Golang Provider.BaseDir方法的具體用法?Golang Provider.BaseDir怎麽用?Golang Provider.BaseDir使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/cloudfoundry/bosh-agent/settings/directories.Provider
的用法示例。
在下文中一共展示了Provider.BaseDir方法的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
}