istio: istio.io/istio/pkg/test/util/reserveport Index | Files

package reserveport

import "istio.io/istio/pkg/test/util/reserveport"

Index

Package Files

api.go manager.go pool.go port.go

type PortManager Uses

type PortManager interface {
    // ReservePort reserves a new port. The lifecycle of the returned port is transferred to the caller.
    ReservePort() (ReservedPort, error)
    ReservePortOrFail(t *testing.T) ReservedPort
    ReservePortNumber() (uint16, error)
    ReservePortNumberOrFail(t *testing.T) uint16
    // Close shuts down this manager and frees any associated resources.
    Close() error
    CloseSilently()
}

PortManager is responsible for reserving ports for an application.

func NewPortManager Uses

func NewPortManager() (mgr PortManager, err error)

NewPortManager allocates a new PortManager

func NewPortManagerOrFail Uses

func NewPortManagerOrFail(t *testing.T) PortManager

NewPortManagerOrFail calls NewPortManager and fails the test if unsuccessful.

type ReservedPort Uses

type ReservedPort interface {
    // GetPort returns the bound port number.
    GetPort() uint16
    // Close unbinds this port.
    Close() error
    CloseSilently()
}

ReservedPort a port reserved by a PortManager

Package reserveport imports 5 packages (graph) and is imported by 2 packages. Updated 2019-09-25. Refresh now. Tools for package owners.