nettesting

package
v0.0.0-...-fc29aca Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2024 License: UPL-1.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TestPortEcho is the name of the echo port
	TestPortEcho = "Echo"
	// TestPortHealth is the name of the health port
	TestPortHealth = "Health"
	// TestPortWebHook is the name of the web-hook port
	TestPortWebHook = "WebHook"
	// TestPortClusterPort is the name of the Coherence cluster port
	TestPortClusterPort = "ClusterPort"
	// TestPortUnicastPort1 is the name of the first Coherence unicast port
	TestPortUnicastPort1 = "UnicastPort1"
	// TestPortUnicastPort2 is the name of the second Coherence unicast port
	TestPortUnicastPort2 = "UnicastPort2"
	// TestPortMetrics is the name of the Coherence metrics port
	TestPortMetrics = "Metrics"
	// TestPortManagement is the name of the Coherence management port
	TestPortManagement = "Management"
	// TestPortOperatorRest is the name of the Operator REST port
	TestPortOperatorRest = "OperatorRest"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientSimulator

type ClientSimulator interface {
	Run(ctx context.Context) error
}

ClientSimulator runs a test simulating connectivity to a port.

func NewClusterMemberRunner

func NewClusterMemberRunner(operatorHost, clusterHost string) ClientSimulator

NewClusterMemberRunner create a new ClusterMemberSimulator

func NewOperatorSimulatorRunner

func NewOperatorSimulatorRunner(host string) ClientSimulator

NewOperatorSimulatorRunner create a new ServerRunner

func NewSimpleClientRunner

func NewSimpleClientRunner(host string, port int, protocol string) ClientSimulator

func NewWebHookClientRunner

func NewWebHookClientRunner(operatorHost string) ClientSimulator

type ServerRunner

type ServerRunner interface {
	Run(ctx context.Context) error
}

ServerRunner manages a server that listens on various ports to allow network connectivity tests to those ports.

func NewServerRunner

func NewServerRunner() ServerRunner

NewServerRunner create a new ServerRunner

type WebServer

type WebServer interface {
	// GetAddress returns the address that this server is listening on.
	GetAddress() net.Addr
	// GetPort returns the port that this server is listening on.
	GetPort() int32
	// Close closes this server's listener
	Close() error
	// Start the server
	Start(ctx context.Context) error
	// Running closes when the server is running
	Running() <-chan struct{}
}

WebServer is a simple test web server.

func NewWebServer

func NewWebServer(name string, port int) WebServer

NewWebServer creates a new WebServer on a specific port

Jump to

Keyboard shortcuts

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