github.com/hashicorp/go-plugin@v1.6.0/internal/cmdrunner/addr_translator.go (about) 1 // Copyright (c) HashiCorp, Inc. 2 // SPDX-License-Identifier: MPL-2.0 3 4 package cmdrunner 5 6 // addrTranslator implements stateless identity functions, as the host and plugin 7 // run in the same context wrt Unix and network addresses. 8 type addrTranslator struct{} 9 10 func (*addrTranslator) PluginToHost(pluginNet, pluginAddr string) (string, string, error) { 11 return pluginNet, pluginAddr, nil 12 } 13 14 func (*addrTranslator) HostToPlugin(hostNet, hostAddr string) (string, string, error) { 15 return hostNet, hostAddr, nil 16 }