pluginutils

package
v1.17.0-beta34 Latest Latest
Warning

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

Go to latest
Published: May 31, 2024 License: Apache-2.0 Imports: 18 Imported by: 17

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DestinationUpstreams

func DestinationUpstreams(snap *v1snap.ApiSnapshot, in *v1.RouteAction) ([]core.ResourceRef, error)

func EnvoyEndpoint

func EnvoyEndpoint(address string, port uint32) *envoy_config_endpoint_v3.Endpoint

func EnvoySingleEndpointLoadAssignment

func EnvoySingleEndpointLoadAssignment(out *envoy_config_cluster_v3.Cluster, address string, port uint32)

func IsDestinationNotFoundErr added in v0.20.2

func IsDestinationNotFoundErr(err error) bool

func MarkHeaders

func MarkHeaders(ctx context.Context, snap *v1snap.ApiSnapshot, in *v1.Route, out *envoy_config_route_v3.Route, headers HeadersToAddFunc) error

Allows you add extra headers for specific destination. The provided callback will be called for all the destinations on the route. Any headers returned will be added to requests going to that destination

func MarkPerFilterConfig

func MarkPerFilterConfig(
	ctx context.Context,
	snap *v1snap.ApiSnapshot,
	in *v1.Route,
	out *envoy_config_route_v3.Route,
	filterName string,
	perFilterConfig PerFilterConfigFunc,
) error

call this from

func ModifyPerFilterConfig added in v1.9.25

func ModifyPerFilterConfig(
	ctx context.Context,
	snap *v1snap.ApiSnapshot,
	in *v1.Route,
	out *envoy_config_route_v3.Route,
	filterName string,
	perFilterConfig PerFilterConfigModifyFunc,
) error

func ModifyRoutePerFilterConfig added in v1.9.25

func ModifyRoutePerFilterConfig(out *envoy_config_route_v3.Route, filterName string, mod ModifyFunc) error

func ModifyVhostPerFilterConfig added in v1.9.25

func ModifyVhostPerFilterConfig(out *envoy_config_route_v3.VirtualHost, filterName string, mod ModifyFunc) error

func ModifyWeightedClusterPerFilterConfig added in v1.9.25

func ModifyWeightedClusterPerFilterConfig(
	out *envoy_config_route_v3.WeightedCluster_ClusterWeight,
	filterName string,
	mod ModifyFunc,
) error

func SetExtensionProtocolOptions added in v1.8.0

func SetExtensionProtocolOptions(out *envoy_config_cluster_v3.Cluster, filterName string, protoext proto.Message) error

func SetRoutePerFilterConfig added in v0.11.1

func SetRoutePerFilterConfig(out *envoy_config_route_v3.Route, filterName string, protoext proto.Message) error

func SetVhostPerFilterConfig added in v0.11.1

func SetVhostPerFilterConfig(out *envoy_config_route_v3.VirtualHost, filterName string, protoext proto.Message) error

func SetWeightedClusterPerFilterConfig added in v0.11.1

func SetWeightedClusterPerFilterConfig(
	out *envoy_config_route_v3.WeightedCluster_ClusterWeight,
	filterName string,
	protoext proto.Message,
) error

Types

type DestinationNotFoundError added in v0.20.2

type DestinationNotFoundError struct {
	Ref          core.ResourceRef
	ResourceType resources.Resource
}

func NewDestinationNotFoundErr added in v0.20.2

func NewDestinationNotFoundErr(ref core.ResourceRef, resourceType resources.Resource) *DestinationNotFoundError

func NewUpstreamGroupNotFoundErr added in v0.20.2

func NewUpstreamGroupNotFoundErr(ref core.ResourceRef) *DestinationNotFoundError

func NewUpstreamNotFoundErr added in v0.20.2

func NewUpstreamNotFoundErr(ref core.ResourceRef) *DestinationNotFoundError

func (*DestinationNotFoundError) Error added in v0.20.2

func (e *DestinationNotFoundError) Error() string

type HeadersToAddFunc

type HeadersToAddFunc func(spec *v1.Destination) ([]*envoy_config_core_v3.HeaderValueOption, error)

type ModifyFunc added in v1.9.25

type ModifyFunc func(existing *any.Any) (proto.Message, error)

type PerFilterConfigFunc

type PerFilterConfigFunc func(spec *v1.Destination) (proto.Message, error)

Return Per-Filter config for destinations, we put them on the Route (single dest) or WeightedCluster (multi dest)

type PerFilterConfigModifyFunc added in v1.9.25

type PerFilterConfigModifyFunc func(spec *v1.Destination, existing *any.Any) (proto.Message, error)

Jump to

Keyboard shortcuts

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