plugintest

package
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2026 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package plugintest provides test helpers for exercising a plugin's Connect/Session against a real target, without depending on the core.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DirectTransport

func DirectTransport() plugin.NetTransport

DirectTransport returns a plugin.NetTransport that dials targets directly, for driving a plugin Connect/Session in tests. It has no egress allow-list, so a test may reach any address it sets up.

func HTTPTransport

func HTTPTransport(baseURL string, rt http.RoundTripper) plugin.NetTransport

HTTPTransport returns a plugin.NetTransport that offers an L7 client (base URL + RoundTripper), like the core's agent http_proxy mode, for testing a plugin's HTTP egress. DialContext (L4) is unavailable.

func TransportFunc

func TransportFunc(dial func(ctx context.Context, network, addr string) (net.Conn, error)) plugin.NetTransport

TransportFunc returns a plugin.NetTransport whose DialContext delegates to dial — for exercising a plugin over a custom or agent-style transport in tests without standing up the core's tunnel registry.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL