Documentation ¶
Index ¶
- Constants
- func CreateCdsRequest(config *AdsConfig) *envoy_api_v2.DiscoveryRequest
- func CreateEdsRequest(config *AdsConfig, clusterNames []string) *envoy_api_v2.DiscoveryRequest
- func CreateLdsRequest(config *AdsConfig) *envoy_api_v2.DiscoveryRequest
- func CreateRdsRequest(config *AdsConfig) *envoy_api_v2.DiscoveryRequest
- func HandleClusterResponse(resp *envoy_api_v2.DiscoveryResponse) []*envoy_api_v2.Cluster
- func HandleEndpointResponse(resp *envoy_api_v2.DiscoveryResponse) []*envoy_api_v2.ClusterLoadAssignment
- func HandleListenerResponse(resp *envoy_api_v2.DiscoveryResponse) []*envoy_api_v2.Listener
- func HandleRouteResponse(resp *envoy_api_v2.DiscoveryResponse) []*envoy_api_v2.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 = "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 HandleEndpointResponse ¶
func HandleEndpointResponse(resp *envoy_api_v2.DiscoveryResponse) []*envoy_api_v2.ClusterLoadAssignment
func HandleListenerResponse ¶
func HandleListenerResponse(resp *envoy_api_v2.DiscoveryResponse) []*envoy_api_v2.Listener
func HandleRouteResponse ¶
func HandleRouteResponse(resp *envoy_api_v2.DiscoveryResponse) []*envoy_api_v2.RouteConfiguration
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) 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_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
Source Files ¶
Click to show internal directories.
Click to hide internal directories.