mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-10-10 09:39:24 +00:00
Then we can check hypervisor liveness in those cases to avoid long timeout when connecting to the agent when hypervisor is dead. For kata-agent, we still use the kata-proxy pid for the same purpose. Signed-off-by: Peng Tao <bergwolf@hyper.sh>
30 lines
745 B
Go
30 lines
745 B
Go
// Copyright (c) 2017 Intel Corporation
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
|
|
package virtcontainers
|
|
|
|
// This is a dummy proxy implementation of the proxy interface, only
|
|
// used for testing purpose.
|
|
type noopProxy struct{}
|
|
|
|
var noopProxyURL = "noopProxyURL"
|
|
|
|
// register is the proxy start implementation for testing purpose.
|
|
// It does nothing.
|
|
func (p *noopProxy) start(params proxyParams) (int, string, error) {
|
|
return params.hid, noopProxyURL, nil
|
|
}
|
|
|
|
// stop is the proxy stop implementation for testing purpose.
|
|
// It does nothing.
|
|
func (p *noopProxy) stop(pid int) error {
|
|
return nil
|
|
}
|
|
|
|
// The noopproxy doesn't need to watch the vm console, thus return false always.
|
|
func (p *noopProxy) consoleWatched() bool {
|
|
return false
|
|
}
|