Documentation
¶
Index ¶
- Constants
- func AnyGogoProtoToStructPb(a *pany.Any) (structpb.Struct, error)
- func AnyToMessage(a *pany.Any) (goproto.Message, error)
- func DestinationUpstreams(snap *v1.ApiSnapshot, in *v1.RouteAction) ([]core.ResourceRef, error)
- func EnvoyEndpoint(address string, port uint32) *envoyendpoint.Endpoint
- func EnvoySingleEndpointLoadAssignment(out *envoyapi.Cluster, address string, port uint32)
- func GogoMessageToAnyGoProto(msg goproto.Message) (*pany.Any, error)
- func IsDestinationNotFoundErr(err error) bool
- func MarkHeaders(ctx context.Context, snap *v1.ApiSnapshot, in *v1.Route, out *envoyroute.Route, ...) error
- func MarkPerFilterConfig(ctx context.Context, snap *v1.ApiSnapshot, in *v1.Route, out *envoyroute.Route, ...) error
- func MessageToAny(msg goproto.Message) (*pany.Any, error)
- func MustAnyToMessage(a *pany.Any) goproto.Message
- func MustGogoMessageToAnyGoProto(msg goproto.Message) *pany.Any
- func MustMessageToAny(msg goproto.Message) *pany.Any
- func SetExtenstionProtocolOptions(out *envoyapi.Cluster, filterName string, protoext proto.Message) error
- func SetRoutePerFilterConfig(out *envoyroute.Route, filterName string, protoext proto.Message) error
- func SetVhostPerFilterConfig(out *envoyroute.VirtualHost, filterName string, protoext proto.Message) error
- func SetWeightedClusterPerFilterConfig(out *envoyroute.WeightedCluster_ClusterWeight, filterName string, ...) error
- type DestinationNotFoundError
- type HeadersToAddFunc
- type TypedPerFilterConfigFunc
Constants ¶
const TlsTransportSocket = "envoy.transport_sockets.tls"
Variables ¶
This section is empty.
Functions ¶
func AnyGogoProtoToStructPb ¶
gogoproto any represented as a goproto can't be unmarshalled unless you unwrap the contents of the goproto from the typed struct (see function above) You may want to follow this with conversion.StructToMessage
func DestinationUpstreams ¶
func DestinationUpstreams(snap *v1.ApiSnapshot, in *v1.RouteAction) ([]core.ResourceRef, error)
func EnvoyEndpoint ¶
func EnvoyEndpoint(address string, port uint32) *envoyendpoint.Endpoint
func GogoMessageToAnyGoProto ¶ added in v1.3.25
gogoprotos converted directly to goproto any can't be marshalled unless you wrap the contents of the gogoproto in a typed struct
func IsDestinationNotFoundErr ¶ added in v0.20.2
func MarkHeaders ¶
func MarkHeaders(ctx context.Context, snap *v1.ApiSnapshot, in *v1.Route, out *envoyroute.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 *v1.ApiSnapshot, in *v1.Route, out *envoyroute.Route, filterName string, typedPerFilterConfig TypedPerFilterConfigFunc) error
call this from
func MustGogoMessageToAnyGoProto ¶ added in v1.3.25
gogoprotos converted directly to goproto any can't be marshalled unless you wrap the contents of the gogoproto in a typed struct
func SetExtenstionProtocolOptions ¶ added in v0.11.1
func SetRoutePerFilterConfig ¶ added in v0.11.1
func SetVhostPerFilterConfig ¶ added in v0.11.1
func SetVhostPerFilterConfig(out *envoyroute.VirtualHost, filterName string, protoext proto.Message) error
func SetWeightedClusterPerFilterConfig ¶ added in v0.11.1
func SetWeightedClusterPerFilterConfig(out *envoyroute.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) ([]*envoycore.HeaderValueOption, error)
type TypedPerFilterConfigFunc ¶
type TypedPerFilterConfigFunc 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)