istio: Index | Files

package common

import ""


Package Files

call.go config.go envoy.go portgen.go

func AddPortIfMissing Uses

func AddPortIfMissing(c *echo.Config, protocol protocol.Instance)

AddPortIfMissing adds a port for the given protocol if none was found.

func CallEcho Uses

func CallEcho(c *client.Instance, opts *echo.CallOptions, outboundPortSelector OutboundPortSelectorFunc) (client.ParsedResponses, error)

func CheckOutboundConfig Uses

func CheckOutboundConfig(source echo.Instance, target echo.Instance, port echo.Port, validator *structpath.Instance) error

CheckOutboundConfig checks the Envoy config dump for outbound configuration to the given target.

func FillInDefaults Uses

func FillInDefaults(ctx resource.Context, defaultDomain string, c *echo.Config) (err error)

func GetPortForProtocol Uses

func GetPortForProtocol(c *echo.Config, protocol protocol.Instance) *echo.Port

GetPortForProtocol returns the first port found with the given protocol, or nil if none was found.

func WaitForConfig Uses

func WaitForConfig(fetch ConfigFetchFunc, accept ConfigAcceptFunc, options ...retry.Option) error

type ConfigAcceptFunc Uses

type ConfigAcceptFunc func(*envoyAdmin.ConfigDump) (bool, error)

ConfigAcceptFunc evaluates the Envoy config dump and either accept/reject it. This is used by WaitForConfig to control the retry loop. If an error is returned, a retry will be attempted. Otherwise the loop is immediately terminated with an error if rejected or none if accepted.

func OutboundConfigAcceptFunc Uses

func OutboundConfigAcceptFunc(source echo.Instance, targets ...echo.Instance) ConfigAcceptFunc

OutboundConfigAcceptFunc returns a function that accepts Envoy configuration if it contains outbound configuration for all of the given instances.

type ConfigFetchFunc Uses

type ConfigFetchFunc func() (*envoyAdmin.ConfigDump, error)

ConfigFetchFunc retrieves the config dump from Envoy.

type OutboundPortSelectorFunc Uses

type OutboundPortSelectorFunc func(servicePort int) (int, error)

OutboundPortSelectorFunc is a function that selects the appropriate outbound port for sending requests to a target service.

var (
    // IdentityOutboundPortSelector is an OutboundPortSelectorFunc that always returns the original service port.
    IdentityOutboundPortSelector OutboundPortSelectorFunc = func(servicePort int) (int, error) {
        return servicePort, nil

Package common imports 22 packages (graph) and is imported by 4 packages. Updated 2020-03-28. Refresh now. Tools for package owners.