istio

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 32 Imported by: 1

Documentation

Index

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 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 (h *IstioIntegrationHandler) GetTCPListener(l net.Listener) (net.Listener, error)

func (*IstioIntegrationHandler) ListenAndServe

func (h *IstioIntegrationHandler) ListenAndServe(ctx context.Context, listenAddress string, handler http.Handler) error

func (*IstioIntegrationHandler) NewStreamHandler

func (h *IstioIntegrationHandler) NewStreamHandler(filters ...api.WasmPluginConfig) (api.StreamHandler, error)

func (*IstioIntegrationHandler) Run

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()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL