gitee.com/leisunstar/runtime@v0.0.0-20200521203717-5cef3e7b53f9/virtcontainers/noop_proxy.go (about) 1 // Copyright (c) 2017 Intel Corporation 2 // 3 // SPDX-License-Identifier: Apache-2.0 4 // 5 6 package virtcontainers 7 8 // This is a dummy proxy implementation of the proxy interface, only 9 // used for testing purpose. 10 type noopProxy struct{} 11 12 var noopProxyURL = "noopProxyURL" 13 14 // register is the proxy start implementation for testing purpose. 15 // It does nothing. 16 func (p *noopProxy) start(params proxyParams) (int, string, error) { 17 return params.hid, noopProxyURL, nil 18 } 19 20 // stop is the proxy stop implementation for testing purpose. 21 // It does nothing. 22 func (p *noopProxy) stop(pid int) error { 23 return nil 24 } 25 26 // The noopproxy doesn't need to watch the vm console, thus return false always. 27 func (p *noopProxy) consoleWatched() bool { 28 return false 29 }