Documentation ¶
Index ¶
- Constants
- Variables
- func NewIstioHTTPHandlerMiddleware() pwhttp.HandleMiddleware
- func NewIstioHTTPRequestTransport(transport http.RoundTripper, caClient ca.Client, ...) http.RoundTripper
- type IstioCAConfigGetterFunc
- type IstioIntegrationHandler
- func (h *IstioIntegrationHandler) GetGRPCDialOptions() ([]grpc.DialOption, error)
- func (h *IstioIntegrationHandler) GetHTTPTransport(transport http.RoundTripper) (http.RoundTripper, error)
- func (h *IstioIntegrationHandler) GetTCPDialer() (itcp.Dialer, error)
- func (h *IstioIntegrationHandler) GetTCPListener(l net.Listener) (net.Listener, error)
- func (h *IstioIntegrationHandler) ListenAndServe(ctx context.Context, listenAddress string, handler http.Handler) error
- func (h *IstioIntegrationHandler) NewStreamHandler(filters ...api.WasmPluginConfig) (api.StreamHandler, error)
- func (h *IstioIntegrationHandler) Run(ctx context.Context)
- func (h *IstioIntegrationHandler) RunMetricsPusher(ctx context.Context) error
- func (h *IstioIntegrationHandler) RunMetricsServer(ctx context.Context)
- type IstioIntegrationHandlerConfig
- type PushgatewayConfig
Constants ¶
View Source
const ( FilterMetadataServiceName = "cluster_metadata.filter_metadata.istio.services.0.name" FilterMetadataServiceHost = "cluster_metadata.filter_metadata.istio.services.0.host" )
Variables ¶
View Source
var ( IstioCAConfigGetterRemote = func(e *environment.IstioEnvironment) (istio_ca.IstioCAClientConfig, error) { return istio_ca.GetIstioCAClientConfig(e.ClusterID, e.IstioRevision) } IstioCAConfigGetterLocal = func(e *environment.IstioEnvironment) (istio_ca.IstioCAClientConfig, error) { return istio_ca.GetIstioCAClientConfigFromLocal(e.ClusterID, e.IstioCAAddress) } IstioCAConfigGetterHeimdall = func(heimdallURL, clientID, clientSecret, version string) IstioCAConfigGetterFunc { return func(e *environment.IstioEnvironment) (istio_ca.IstioCAClientConfig, error) { c, err := istio_ca.GetIstioCAClientConfigFromHeimdall(heimdallURL, clientID, clientSecret, version) if err != nil { return istio_ca.IstioCAClientConfig{}, err } e.Override(c.Environment) e.ClusterID = c.CAClientConfig.ClusterID e.IstioRevision = c.CAClientConfig.Revision e.IstioCAAddress = c.CAClientConfig.CAEndpointSAN e.IstioVersion = c.Environment.IstioVersion return c.CAClientConfig, nil } } )
View Source
var DefaultIstioIntegrationHandlerConfig = IstioIntegrationHandlerConfig{ MetricsPath: "/stats/prometheus", MetricsAddress: ":15090", UseTLS: true, }
Functions ¶
func NewIstioHTTPHandlerMiddleware ¶
func NewIstioHTTPHandlerMiddleware() pwhttp.HandleMiddleware
func NewIstioHTTPRequestTransport ¶
func NewIstioHTTPRequestTransport(transport http.RoundTripper, caClient ca.Client, discoveryClient discovery.DiscoveryClient, logger logr.Logger) http.RoundTripper
Types ¶
type IstioCAConfigGetterFunc ¶
type IstioCAConfigGetterFunc func(e *environment.IstioEnvironment) (istio_ca.IstioCAClientConfig, error)
type IstioIntegrationHandler ¶
type IstioIntegrationHandler struct {
// contains filtered or unexported fields
}
func NewIstioIntegrationHandler ¶
func NewIstioIntegrationHandler(config *IstioIntegrationHandlerConfig, logger logr.Logger) (*IstioIntegrationHandler, error)
func (*IstioIntegrationHandler) GetGRPCDialOptions ¶
func (h *IstioIntegrationHandler) GetGRPCDialOptions() ([]grpc.DialOption, error)
func (*IstioIntegrationHandler) GetHTTPTransport ¶
func (h *IstioIntegrationHandler) GetHTTPTransport(transport http.RoundTripper) (http.RoundTripper, error)
func (*IstioIntegrationHandler) GetTCPDialer ¶
func (h *IstioIntegrationHandler) GetTCPDialer() (itcp.Dialer, error)
func (*IstioIntegrationHandler) GetTCPListener ¶
func (*IstioIntegrationHandler) ListenAndServe ¶
func (*IstioIntegrationHandler) NewStreamHandler ¶
func (h *IstioIntegrationHandler) NewStreamHandler(filters ...api.WasmPluginConfig) (api.StreamHandler, error)
func (*IstioIntegrationHandler) Run ¶
func (h *IstioIntegrationHandler) Run(ctx context.Context)
func (*IstioIntegrationHandler) RunMetricsPusher ¶
func (h *IstioIntegrationHandler) RunMetricsPusher(ctx context.Context) error
func (*IstioIntegrationHandler) RunMetricsServer ¶
func (h *IstioIntegrationHandler) RunMetricsServer(ctx context.Context)
type IstioIntegrationHandlerConfig ¶
type IstioIntegrationHandlerConfig struct { MetricsPath string MetricsAddress string PushgatewayConfig *PushgatewayConfig UseTLS bool ServerFilters []api.WasmPluginConfig ClientFilters []api.WasmPluginConfig IstioCAConfigGetter IstioCAConfigGetterFunc DefaultWASMRuntime string }
func (*IstioIntegrationHandlerConfig) SetDefaults ¶
func (c *IstioIntegrationHandlerConfig) SetDefaults()
type PushgatewayConfig ¶
type PushgatewayConfig struct { Address string PushInterval time.Duration UseUniqueIDLabel bool UniqueIDLabelName string }
func (*PushgatewayConfig) SetDefaults ¶
func (c *PushgatewayConfig) SetDefaults()
Source Files ¶
Click to show internal directories.
Click to hide internal directories.