Documentation
¶
Index ¶
- func ReattachFunc(logger hclog.Logger, id, hostSocketDir string) (runner.AttachedRunner, error)
- type ContainerRunner
- func (c *ContainerRunner) Diagnose(_ context.Context) string
- func (c *ContainerRunner) HostToPlugin(hostNet, hostAddr string) (pluginNet string, pluginAddr string, err error)
- func (c *ContainerRunner) ID() string
- func (c *ContainerRunner) Kill(ctx context.Context) error
- func (c *ContainerRunner) Name() string
- func (c *ContainerRunner) PluginToHost(pluginNet, pluginAddr string) (hostNet string, hostAddr string, err error)
- func (c *ContainerRunner) Start(ctx context.Context) error
- func (c *ContainerRunner) Stderr() io.ReadCloser
- func (c *ContainerRunner) Stdout() io.ReadCloser
- func (c *ContainerRunner) Wait(ctx context.Context) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReattachFunc ¶
func ReattachFunc(logger hclog.Logger, id, hostSocketDir string) (runner.AttachedRunner, error)
Types ¶
type ContainerRunner ¶
type ContainerRunner struct {
// contains filtered or unexported fields
}
ContainerRunner implements go-plugin's runner.Runner interface to run plugins inside a container.
func NewContainerRunner ¶
func NewContainerRunner(logger hclog.Logger, cmd *exec.Cmd, cfg *config.ContainerConfig, hostSocketDir string) (*ContainerRunner, error)
NewContainerRunner must be passed a cmd that hasn't yet been started.
func (*ContainerRunner) Diagnose ¶
func (c *ContainerRunner) Diagnose(_ context.Context) string
Diagnose prints out the container config to help users manually re-run the plugin for debugging purposes.
func (*ContainerRunner) HostToPlugin ¶
func (c *ContainerRunner) HostToPlugin(hostNet, hostAddr string) (pluginNet string, pluginAddr string, err error)
func (*ContainerRunner) ID ¶
func (c *ContainerRunner) ID() string
func (*ContainerRunner) Name ¶
func (c *ContainerRunner) Name() string
func (*ContainerRunner) PluginToHost ¶
func (c *ContainerRunner) PluginToHost(pluginNet, pluginAddr string) (hostNet string, hostAddr string, err error)
func (*ContainerRunner) Stderr ¶
func (c *ContainerRunner) Stderr() io.ReadCloser
func (*ContainerRunner) Stdout ¶
func (c *ContainerRunner) Stdout() io.ReadCloser
Click to show internal directories.
Click to hide internal directories.