istio: istio.io/istio/pkg/test/framework/components/ingress Index | Files

package ingress

import "istio.io/istio/pkg/test/framework/components/ingress"

Index

Package Files

ingress.go kube.go

Constants

const (
    DefaultRequestTimeout = 1 * time.Minute
)

type CallOptions Uses

type CallOptions struct {
    // Host specifies the host to be used on the request. If not provided, an appropriate
    // default is chosen for the target Instance.
    Host string

    // Path specifies the URL path for the request.
    Path string

    // Timeout used for each individual request. Must be > 0, otherwise 1 minute is used.
    Timeout time.Duration

    // CaCert is inline base64 encoded root certificate that authenticates server certificate provided
    // by ingress gateway.
    CaCert string
    // PrivateKey is inline base64 encoded private key for test client.
    PrivateKey string
    // Cert is inline base64 encoded certificate for test client.
    Cert string

    // Address is the ingress gateway IP and port to call to.
    Address net.TCPAddr

    // CallType specifies what type of call to make (PlainText, TLS, mTLS).
    CallType CallType
}

CallOptions defines options for calling a Endpoint.

type CallResponse Uses

type CallResponse struct {
    // Response status code
    Code int

    // Response body
    Body string
}

CallResponse is the result of a call made through Istio Ingress.

type CallType Uses

type CallType int

CallType defines ingress gateway type

const (
    PlainText CallType = 0
    TLS       CallType = 1
    Mtls      CallType = 2
)

type Config Uses

type Config struct {
    Istio istio.Instance
    // IngressType specifies the type of ingress gateway.
    IngressType CallType
}

type Instance Uses

type Instance interface {
    resource.Resource

    // HTTPAddress returns the external HTTP address of the ingress gateway (or the NodePort address,
    // when running under Minikube).
    HTTPAddress() net.TCPAddr
    // HTTPSAddress returns the external HTTPS address of the ingress gateway (or the
    // NodePort address, when running under Minikube).
    HTTPSAddress() net.TCPAddr

    //  Call makes a call through ingress.
    Call(options CallOptions) (CallResponse, error)
    CallOrFail(t test.Failer, options CallOptions) CallResponse

    // ProxyStats returns proxy stats, or error if failure happens.
    ProxyStats() (map[string]int, error)
}

Instance represents a deployed Ingress Gateway instance.

func New Uses

func New(ctx resource.Context, cfg Config) (i Instance, err error)

Deploy returns a new instance of echo.

func NewOrFail Uses

func NewOrFail(t test.Failer, ctx resource.Context, cfg Config) Instance

Deploy returns a new Ingress instance or fails test

Package ingress imports 17 packages (graph). Updated 2019-09-14. Refresh now. Tools for package owners.