Documentation ¶
Index ¶
- func NewCluster(name string, connectTimeout time.Duration, endpoints []*endpoint.LbEndpoint, ...) *v2.Cluster
- func NewHTTPConnectionManager(virtualHosts []*route.VirtualHost) httpconnectionmanagerv2.HttpConnectionManager
- func NewHTTPListener(manager *httpconnmanagerv2.HttpConnectionManager, port uint32) (*v2.Listener, error)
- func NewHTTPSListener(manager *httpconnmanagerv2.HttpConnectionManager, port uint32, ...) (*v2.Listener, error)
- func NewHTTPSListenerWithSNI(manager *httpconnmanagerv2.HttpConnectionManager, port uint32, ...) (*v2.Listener, error)
- func NewLBEndpoint(ip string, port uint32) *endpoint.LbEndpoint
- func NewRDSHTTPConnectionManager(routeConfigName string) httpconnectionmanagerv2.HttpConnectionManager_Rds
- func NewRoute(name string, path string, wrs []*route.WeightedCluster_ClusterWeight, ...) *route.Route
- func NewRouteStatusOK(name string, path string) *route.Route
- func NewVirtualHost(name string, domains []string, routes []*route.Route) route.VirtualHost
- func NewVirtualHostWithExtAuthz(name string, contextExtensions map[string]string, domains []string, ...) route.VirtualHost
- func NewWeightedCluster(name string, trafficPerc uint32, headers map[string]string) *route.WeightedCluster_ClusterWeight
- type Callbacks
- func (cb *Callbacks) OnFetchRequest(ctx context.Context, req *v2.DiscoveryRequest) error
- func (cb *Callbacks) OnFetchResponse(req *v2.DiscoveryRequest, resp *v2.DiscoveryResponse)
- func (cb *Callbacks) OnStreamClosed(id int64)
- func (cb *Callbacks) OnStreamOpen(ctx context.Context, id int64, typ string) error
- func (cb *Callbacks) OnStreamRequest(_ int64, req *v2.DiscoveryRequest) error
- func (cb *Callbacks) OnStreamResponse(i int64, request *v2.DiscoveryRequest, response *v2.DiscoveryResponse)
- type ExternalAuthzConfig
- type SNIMatch
- type XdsServer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCluster ¶
func NewCluster(name string, connectTimeout time.Duration, endpoints []*endpoint.LbEndpoint, isHTTP2 bool, discoveryType v2.Cluster_DiscoveryType) *v2.Cluster
func NewHTTPConnectionManager ¶
func NewHTTPConnectionManager(virtualHosts []*route.VirtualHost) httpconnectionmanagerv2.HttpConnectionManager
func NewHTTPListener ¶
func NewHTTPListener(manager *httpconnmanagerv2.HttpConnectionManager, port uint32) (*v2.Listener, error)
func NewHTTPSListener ¶
func NewHTTPSListener(manager *httpconnmanagerv2.HttpConnectionManager, port uint32, certificateChain string, privateKey string) (*v2.Listener, error)
func NewHTTPSListenerWithSNI ¶
func NewHTTPSListenerWithSNI(manager *httpconnmanagerv2.HttpConnectionManager, port uint32, sniMatches []*SNIMatch) (*v2.Listener, error)
Configures a Listener with SNI. Ref: https://www.envoyproxy.io/docs/envoy/latest/faq/configuration/sni.html
func NewLBEndpoint ¶
func NewLBEndpoint(ip string, port uint32) *endpoint.LbEndpoint
func NewRDSHTTPConnectionManager ¶
func NewRDSHTTPConnectionManager(routeConfigName string) httpconnectionmanagerv2.HttpConnectionManager_Rds
func NewRouteStatusOK ¶
Creates a route that simply returns 200
func NewVirtualHost ¶
func NewWeightedCluster ¶
Types ¶
type Callbacks ¶
type Callbacks struct { Logger *zap.SugaredLogger OnError func() }
func (*Callbacks) OnFetchRequest ¶
OnFetchRequest is called for each Fetch request. Returning an error will end processing of the request and respond with an error.
func (*Callbacks) OnFetchResponse ¶
func (cb *Callbacks) OnFetchResponse(req *v2.DiscoveryRequest, resp *v2.DiscoveryResponse)
OnFetchResponse is called immediately prior to sending a response.
func (*Callbacks) OnStreamClosed ¶
OnStreamClosed is called immediately prior to closing an xDS stream with a stream ID.
func (*Callbacks) OnStreamOpen ¶
Returning an error will end processing and close the stream. OnStreamClosed will still be called.
func (*Callbacks) OnStreamRequest ¶
func (cb *Callbacks) OnStreamRequest(_ int64, req *v2.DiscoveryRequest) error
OnStreamRequest is called once a request is received on a stream. Returning an error will end processing and close the stream. OnStreamClosed will still be called.
func (*Callbacks) OnStreamResponse ¶
func (cb *Callbacks) OnStreamResponse(i int64, request *v2.DiscoveryRequest, response *v2.DiscoveryResponse)
OnStreamResponse is called immediately prior to sending a response on a stream.
type ExternalAuthzConfig ¶
type ExternalAuthzConfig struct { Enabled bool Host string Port int FailureModeAllow bool MaxRequestBytes int Timeout duration.Duration Cluster *v2.Cluster HTTPFilter *httpconnectionmanagerv2.HttpFilter }
func GetExternalAuthzConfig ¶
func GetExternalAuthzConfig() ExternalAuthzConfig
type XdsServer ¶
type XdsServer struct {
// contains filtered or unexported fields
}
func NewXdsServer ¶
func (*XdsServer) GetSnapshot ¶ added in v0.15.0
func (*XdsServer) RunManagementServer ¶
func (envoyXdsServer *XdsServer) RunManagementServer()
RunManagementServer starts an xDS server at the given Port.