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: 41 Imported by: 2

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 = resource.ListenerType
	EnvoyCluster  = resource.ClusterType
	EnvoyEndpoint = resource.EndpointType
	EnvoyRoute    = resource.RouteType
)

Variables

This section is empty.

Functions

func UnmarshalResources

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

UnmarshalResources register istio.ParseAdsConfig

Types

type AdsConfig

type AdsConfig struct {
	APIType  envoy_config_core_v3.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() *envoy_config_core_v3.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 (*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_config_cluster_v3.Cluster_LbPolicy
	Address        []string
	ConnectTimeout *time.Duration
	TlsContext     *envoy_config_core_v3.TransportSocket
}

ClusterConfig contains a cluster info from static resources

func (*ClusterConfig) GetEndpoint

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

GetEndpoint return an endpoint address by random

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