xds

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: 31 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CDS_UPDATE_SUCCESS   = "cluster_manager.cds.update_success"
	CDS_UPDATE_REJECT    = "cluster_manager.cds.update_rejected"
	LDS_UPDATE_SUCCESS   = "listener_manager.lds.update_success"
	LDS_UPDATE_REJECT    = "listener_manager.lds.update_rejected"
	SERVER_STATE         = "server.state"
	STAT_WORKERS_STARTED = "listener_manager.workers_started"
)
View Source
const (
	EnvoyListener              = "type.googleapis.com/envoy.api.v2.Listener"
	EnvoyCluster               = "type.googleapis.com/envoy.api.v2.Cluster"
	EnvoyClusterLoadAssignment = "type.googleapis.com/envoy.api.v2.ClusterLoadAssignment"
	EnvoyRouteConfiguration    = "type.googleapis.com/envoy.api.v2.RouteConfiguration"
)

Variables

This section is empty.

Functions

func CreateCdsRequest

func CreateCdsRequest(config *AdsConfig) *envoy_api_v2.DiscoveryRequest

func CreateEdsRequest

func CreateEdsRequest(config *AdsConfig, clusterNames []string) *envoy_api_v2.DiscoveryRequest

func CreateLdsRequest

func CreateLdsRequest(config *AdsConfig) *envoy_api_v2.DiscoveryRequest

func CreateRdsRequest

func CreateRdsRequest(config *AdsConfig) *envoy_api_v2.DiscoveryRequest

func HandleClusterResponse

func HandleClusterResponse(resp *envoy_api_v2.DiscoveryResponse) []*envoy_api_v2.Cluster

func HandleListenerResponse

func HandleListenerResponse(resp *envoy_api_v2.DiscoveryResponse) []*envoy_api_v2.Listener

func UnmarshalResources

func UnmarshalResources(dynamic, static json.RawMessage) (istio.XdsStreamConfig, error)

UnmarshalResources register istio.ParseAdsConfig

Types

type AdsConfig

type AdsConfig struct {
	APIType  core.ApiConfigSource_ApiType
	Services []*ServiceConfig
	Clusters map[string]*ClusterConfig
	// contains filtered or unexported fields
}

func (*AdsConfig) CreateXdsStreamClient

func (ads *AdsConfig) CreateXdsStreamClient() (istio.XdsStreamClient, error)

func (*AdsConfig) InitAdsRequest

func (ads *AdsConfig) InitAdsRequest() interface{}

InitAdsRequest creates a cds request

func (*AdsConfig) Node

func (ads *AdsConfig) Node() *core.Node

func (*AdsConfig) RefreshDelay

func (ads *AdsConfig) RefreshDelay() time.Duration

type AdsStreamClient

type AdsStreamClient struct {
	// contains filtered or unexported fields
}

func NewAdsStreamClient

func NewAdsStreamClient(c *AdsConfig) (*AdsStreamClient, error)

func (*AdsStreamClient) AckResponse

func (ads *AdsStreamClient) AckResponse(resp *envoy_api_v2.DiscoveryResponse)

func (*AdsStreamClient) HandleResponse

func (ads *AdsStreamClient) HandleResponse(resp interface{})

func (*AdsStreamClient) Recv

func (ads *AdsStreamClient) Recv() (interface{}, error)

func (*AdsStreamClient) Send

func (ads *AdsStreamClient) Send(req interface{}) error

func (*AdsStreamClient) Stop

func (ads *AdsStreamClient) Stop()

type ClusterConfig

type ClusterConfig struct {
	LbPolicy       envoy_api_v2.Cluster_LbPolicy
	Address        []string
	ConnectTimeout *time.Duration
	TlsContext     *envoy_api_v2_auth.UpstreamTlsContext
}

ClusterConfig contains an cluster info from static resources

func (*ClusterConfig) GetEndpoint

func (c *ClusterConfig) GetEndpoint() (string, *time.Duration)

type ServiceConfig

type ServiceConfig struct {
	Timeout       *time.Duration
	ClusterConfig *ClusterConfig
}

ServiceConfig for grpc service

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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