Documentation ¶
Index ¶
- func CallEcho(client *appEcho.Client, opts *echo.CallOptions, ...) (appEcho.ParsedResponses, error)
- func CheckOutboundConfig(target echo.Instance, port echo.Port, validator *structpath.Instance) error
- func FillInDefaults(ctx resource.Context, defaultDomain string, c *echo.Config) (err error)
- func GetGRPCPort(c *echo.Config) *echo.Port
- func WaitForConfig(fetch ConfigFetchFunc, accept ConfigAcceptFunc, options ...retry.Option) error
- type ConfigAcceptFunc
- type ConfigFetchFunc
- type OutboundPortSelectorFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallEcho ¶
func CallEcho(client *appEcho.Client, opts *echo.CallOptions, outboundPortSelector OutboundPortSelectorFunc) (appEcho.ParsedResponses, error)
func CheckOutboundConfig ¶
func CheckOutboundConfig(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 ¶
func WaitForConfig ¶
func WaitForConfig(fetch ConfigFetchFunc, accept ConfigAcceptFunc, options ...retry.Option) error
Types ¶
type ConfigAcceptFunc ¶
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 ¶
func OutboundConfigAcceptFunc(outboundInstances ...echo.Instance) ConfigAcceptFunc
OutboundConfigAcceptFunc returns a function that accepts Envoy configuration if it contains outbound configuration for all of the given instances.
type ConfigFetchFunc ¶
type ConfigFetchFunc func() (*envoyAdmin.ConfigDump, error)
ConfigFetchFunc retrieves the config dump from Envoy.
type OutboundPortSelectorFunc ¶
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 } )