Documentation ¶
Index ¶
- Constants
- func CreateCdsRequest(config *AdsConfig) *envoy_service_discovery_v3.DiscoveryRequest
- func CreateEdsRequest(config *AdsConfig) *envoy_service_discovery_v3.DiscoveryRequest
- func CreateLdsRequest(config *AdsConfig) *envoy_service_discovery_v3.DiscoveryRequest
- func CreateRdsRequest(config *AdsConfig) *envoy_service_discovery_v3.DiscoveryRequest
- func HandleClusterResponse(resp *envoy_service_discovery_v3.DiscoveryResponse) []*envoy_config_cluster_v3.Cluster
- func HandleEndpointResponse(resp *envoy_service_discovery_v3.DiscoveryResponse) []*envoy_config_endpoint_v3.ClusterLoadAssignment
- func HandleListenerResponse(resp *envoy_service_discovery_v3.DiscoveryResponse) []*envoy_config_listener_v3.Listener
- func HandleRouteResponse(resp *envoy_service_discovery_v3.DiscoveryResponse) []*envoy_config_route_v3.RouteConfiguration
- func UnmarshalResources(dynamic, static json.RawMessage) (istio.XdsStreamConfig, error)
- type AdsConfig
- type AdsStreamClient
- type ClusterConfig
- type ServiceConfig
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 CreateCdsRequest ¶
func CreateCdsRequest(config *AdsConfig) *envoy_service_discovery_v3.DiscoveryRequest
func CreateEdsRequest ¶
func CreateEdsRequest(config *AdsConfig) *envoy_service_discovery_v3.DiscoveryRequest
func CreateLdsRequest ¶
func CreateLdsRequest(config *AdsConfig) *envoy_service_discovery_v3.DiscoveryRequest
func CreateRdsRequest ¶
func CreateRdsRequest(config *AdsConfig) *envoy_service_discovery_v3.DiscoveryRequest
func HandleClusterResponse ¶
func HandleClusterResponse(resp *envoy_service_discovery_v3.DiscoveryResponse) []*envoy_config_cluster_v3.Cluster
func HandleEndpointResponse ¶
func HandleEndpointResponse(resp *envoy_service_discovery_v3.DiscoveryResponse) []*envoy_config_endpoint_v3.ClusterLoadAssignment
func HandleListenerResponse ¶
func HandleListenerResponse(resp *envoy_service_discovery_v3.DiscoveryResponse) []*envoy_config_listener_v3.Listener
func HandleRouteResponse ¶
func HandleRouteResponse(resp *envoy_service_discovery_v3.DiscoveryResponse) []*envoy_config_route_v3.RouteConfiguration
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 ¶
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_service_discovery_v3.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_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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.