本文整理汇总了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)
}