conv

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: Apache-2.0 Imports: 56 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CdsUpdateSuccessTotal = "cds_update_success"
	CdsUpdateRejectTotal  = "cds_update_reject"
	LdsUpdateSuccessTotal = "ls_update_success"
	LdsUpdateRejectTotal  = "lds_update_reject"
)

metrics key in listener/proxy

View Source
const (
	MosnPayloadLimit = "mosn.payload_limit"
)

istio stream filter names, which is quite different from mosn

View Source
const XdsType = "xds"

DownstreamType represents downstream metrics type

Variables

This section is empty.

Functions

func ConvertClustersConfig

func ConvertClustersConfig(xdsClusters []*envoy_config_cluster_v3.Cluster) []*v2.Cluster

func ConvertDuration

func ConvertDuration(p *duration.Duration) time.Duration

func ConvertEndpointsConfig

func ConvertEndpointsConfig(xdsEndpoint *envoy_config_endpoint_v3.LocalityLbEndpoints) []v2.Host

func ConvertListenerConfig

func ConvertListenerConfig(xdsListener *envoy_config_listener_v3.Listener, rh routeHandler) []*v2.Listener

func ConvertRouterConf

func ConvertRouterConf(routeConfigName string, xdsRouteConfig *envoy_config_route_v3.RouteConfiguration) (*v2.RouterConfiguration, bool)

func EnvoyConfigDeleteClusterByName

func EnvoyConfigDeleteClusterByName(name string)

func EnvoyConfigDeleteListeners

func EnvoyConfigDeleteListeners(listeners []*envoy_config_listener_v3.Listener)

func EnvoyConfigDump

func EnvoyConfigDump() []byte

EnvoyConfigDump dump all envoy config

func EnvoyConfigUpdateClusters

func EnvoyConfigUpdateClusters(clusters []*envoy_config_cluster_v3.Cluster)

EnvoyConfigUpdateClusters update envoy cluster config

func EnvoyConfigUpdateListeners

func EnvoyConfigUpdateListeners(listeners []*envoy_config_listener_v3.Listener)

EnvoyConfigUpdateListeners update envoy listener config

func EnvoyConfigUpdateRoutes

func EnvoyConfigUpdateRoutes(routes []*envoy_config_route_v3.RouteConfiguration)

EnvoyConfigUpdateRoutes update envoy route config

func NewConverter

func NewConverter() *xdsConverter

Types

type Converter

type Converter interface {
	Stats() *XdsStats
	AppendRouterName(name string)
	GetRouterNames() []string
	ConvertAddOrUpdateRouters(routers []*envoy_config_route_v3.RouteConfiguration)
	ConvertAddOrUpdateListeners(listeners []*envoy_config_listener_v3.Listener)
	ConvertDeleteListeners(listeners []*envoy_config_listener_v3.Listener)
	ConvertUpdateClusters(clusters []*envoy_config_cluster_v3.Cluster)
	ConvertDeleteClusters(clusters []*envoy_config_cluster_v3.Cluster)
	ConvertUpdateEndpoints(loadAssignments []*envoy_config_endpoint_v3.ClusterLoadAssignment) error
}

Converter as an interface for mock test

type DefaultPassthroughCluster added in v1.3.0

type DefaultPassthroughCluster string

DefaultPassthroughCluster: EGRESS_CLUSTER or INGRESS_CLUSTER, counterpart of v2.ListenerType

const EGRESS_CLUSTER DefaultPassthroughCluster = "PassthroughCluster"
const INGRESS_CLUSTER DefaultPassthroughCluster = "InboundPassthroughClusterIpv4"

type XdsStats

type XdsStats struct {
	CdsUpdateSuccess gometrics.Counter
	CdsUpdateReject  gometrics.Counter
	LdsUpdateSuccess gometrics.Counter
	LdsUpdateReject  gometrics.Counter
}

func NewXdsStats

func NewXdsStats() XdsStats

NewXdsStats returns a stats with namespace prefix proxy

Jump to

Keyboard shortcuts

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