当前位置: 首页>>代码示例>>Golang>>正文


Golang Vm.KillContainer方法代码示例

本文整理汇总了Golang中github.com/hyperhq/runv/hypervisor.Vm.KillContainer方法的典型用法代码示例。如果您正苦于以下问题:Golang Vm.KillContainer方法的具体用法?Golang Vm.KillContainer怎么用?Golang Vm.KillContainer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在github.com/hyperhq/runv/hypervisor.Vm的用法示例。


在下文中一共展示了Vm.KillContainer方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: ApplyServices

func ApplyServices(vm *hypervisor.Vm, container string, services []pod.UserService) error {
	// Update lo ip addresses
	oldServices, err := GetServices(vm, container)
	if err != nil {
		return err
	}
	err = UpdateLoopbackAddress(vm, container, oldServices, services)
	if err != nil {
		return err
	}

	// Update haproxy config
	config := path.Join(ServiceVolume, ServiceConfig)
	vm.WriteFile(container, config, GenerateServiceConfig(services))

	return vm.KillContainer(container, linuxsignal.SIGHUP)
}
开发者ID:juito,项目名称:hyper,代码行数:17,代码来源:servicediscovery.go


注:本文中的github.com/hyperhq/runv/hypervisor.Vm.KillContainer方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。