本文整理匯總了Golang中bosh/platform.Platform.GetCompressor方法的典型用法代碼示例。如果您正苦於以下問題:Golang Platform.GetCompressor方法的具體用法?Golang Platform.GetCompressor怎麽用?Golang Platform.GetCompressor使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類bosh/platform.Platform
的用法示例。
在下文中一共展示了Platform.GetCompressor方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: NewFactory
func NewFactory(
settings boshsettings.Service,
platform boshplatform.Platform,
blobstore boshblob.Blobstore,
taskService boshtask.Service,
applier boshappl.Applier,
) (factory Factory) {
fs := platform.GetFs()
compressor := platform.GetCompressor()
factory = concreteFactory{
availableActions: map[string]Action{
"apply": newApply(applier, fs, platform),
"drain": newDrain(),
"fetch_logs": newLogs(compressor, blobstore),
"get_task": newGetTask(taskService),
"get_state": newGetState(settings, fs),
"list_disk": newListDisk(settings, platform),
"migrate_disk": newMigrateDisk(settings, platform),
"mount_disk": newMountDisk(settings, platform),
"ping": newPing(),
"ssh": newSsh(settings, platform),
"start": newStart(),
"stop": newStop(),
"unmount_disk": newUnmountDisk(settings, platform),
},
}
return
}
示例2: NewFactory
func NewFactory(
settingsService boshsettings.Service,
platform boshplatform.Platform,
blobstore boshblob.Blobstore,
taskService boshtask.Service,
notifier boshnotif.Notifier,
applier boshappl.Applier,
compiler boshcomp.Compiler,
jobSupervisor boshjobsuper.JobSupervisor,
specService boshas.V1Service,
drainScriptProvider boshdrain.DrainScriptProvider,
logger boshlog.Logger,
) (factory Factory) {
compressor := platform.GetCompressor()
copier := platform.GetCopier()
dirProvider := platform.GetDirProvider()
vitalsService := platform.GetVitalsService()
ntpService := boshntp.NewConcreteService(platform.GetFs(), dirProvider)
factory = concreteFactory{
availableActions: map[string]Action{
// Task management
"ping": NewPing(),
"get_task": NewGetTask(taskService),
"cancel_task": NewCancelTask(taskService),
// VM admin
"ssh": NewSSH(settingsService, platform, dirProvider),
"fetch_logs": NewFetchLogs(compressor, copier, blobstore, dirProvider),
// Job management
"prepare": NewPrepare(applier),
"apply": NewApply(applier, specService, settingsService),
"start": NewStart(jobSupervisor),
"stop": NewStop(jobSupervisor),
"drain": NewDrain(notifier, specService, drainScriptProvider, jobSupervisor),
"get_state": NewGetState(settingsService, specService, jobSupervisor, vitalsService, ntpService),
"run_errand": NewRunErrand(specService, dirProvider.JobsDir(), platform.GetRunner(), logger),
// Compilation
"compile_package": NewCompilePackage(compiler),
"release_apply_spec": NewReleaseApplySpec(platform),
// Disk management
"list_disk": NewListDisk(settingsService, platform, logger),
"migrate_disk": NewMigrateDisk(platform, dirProvider),
"mount_disk": NewMountDisk(settingsService, platform, platform, dirProvider),
"unmount_disk": NewUnmountDisk(settingsService, platform),
// Networking
"prepare_network_change": NewPrepareNetworkChange(platform.GetFs(), settingsService),
"prepare_configure_networks": NewPrepareConfigureNetworks(platform, settingsService),
"configure_networks": NewConfigureNetworks(),
},
}
return
}
示例3: NewFactory
func NewFactory(
settings boshsettings.Service,
platform boshplatform.Platform,
blobstore boshblob.Blobstore,
taskService boshtask.Service,
notifier boshnotif.Notifier,
applier boshappl.Applier,
compiler boshcomp.Compiler,
jobSupervisor boshjobsuper.JobSupervisor,
specService boshas.V1Service,
drainScriptProvider boshdrain.DrainScriptProvider,
) (factory Factory) {
compressor := platform.GetCompressor()
copier := platform.GetCopier()
dirProvider := platform.GetDirProvider()
vitalsService := platform.GetVitalsService()
ntpService := boshntp.NewConcreteService(platform.GetFs(), dirProvider)
factory = concreteFactory{
availableActions: map[string]Action{
"apply": NewApply(applier, specService),
"drain": NewDrain(notifier, specService, drainScriptProvider),
"fetch_logs": NewLogs(compressor, copier, blobstore, dirProvider),
"get_task": NewGetTask(taskService),
"get_state": NewGetState(settings, specService, jobSupervisor, vitalsService, ntpService),
"list_disk": NewListDisk(settings, platform),
"migrate_disk": NewMigrateDisk(platform, dirProvider),
"mount_disk": NewMountDisk(settings, platform, dirProvider),
"ping": NewPing(),
"prepare_network_change": NewPrepareNetworkChange(platform),
"ssh": NewSsh(settings, platform, dirProvider),
"start": NewStart(jobSupervisor),
"stop": NewStop(jobSupervisor),
"unmount_disk": NewUnmountDisk(settings, platform),
"compile_package": NewCompilePackage(compiler),
"release_apply_spec": NewReleaseApplySpec(platform),
},
}
return
}
示例4: NewFactory
func NewFactory(
settings boshsettings.Service,
platform boshplatform.Platform,
blobstore boshblob.Blobstore,
taskService boshtask.Service,
notifier boshnotif.Notifier,
applier boshappl.Applier,
compiler boshcomp.Compiler,
monitor boshmon.Monitor,
specService boshas.V1Service,
dirProvider boshdirs.DirectoriesProvider,
drainScriptProvider boshdrain.DrainScriptProvider,
) (factory Factory) {
compressor := platform.GetCompressor()
factory = concreteFactory{
availableActions: map[string]Action{
"apply": newApply(applier, specService),
"drain": newDrain(notifier, specService, drainScriptProvider),
"fetch_logs": newLogs(compressor, blobstore, dirProvider),
"get_task": newGetTask(taskService),
"get_state": newGetState(settings, specService, monitor),
"list_disk": newListDisk(settings, platform),
"migrate_disk": newMigrateDisk(settings, platform, dirProvider),
"mount_disk": newMountDisk(settings, platform, dirProvider),
"ping": newPing(),
"prepare_network_change": newPrepareNetworkChange(),
"ssh": newSsh(settings, platform, dirProvider),
"start": newStart(monitor),
"stop": newStop(monitor),
"unmount_disk": newUnmountDisk(settings, platform),
"compile_package": newCompilePackage(compiler),
},
}
return
}