clientmiddleware

package
v11.1.4-modfix Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: AGPL-3.0 Imports: 38 Imported by: 0

Documentation

Index

Constants

View Source
const (
	QueryPubdash   = "pubdash"
	QueryDashboard = "dashboard"
)
View Source
const GrafanaInternalRequest = "X-Grafana-Internal-Request"
View Source
const GrafanaRequestID = "X-Grafana-Request-Id"
View Source
const GrafanaSignedRequestID = "X-Grafana-Signed-Request-Id"
View Source
const XRealIPHeader = "X-Real-Ip"

Variables

View Source
var QueryCachingRequestHistogram = prometheus.NewHistogramVec(prometheus.HistogramOpts{
	Namespace: metrics.ExporterName,
	Subsystem: "caching",
	Name:      "query_caching_request_duration_seconds",
	Help:      "histogram of grafana query endpoint requests in seconds",
	Buckets:   []float64{.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10, 25, 50, 100},
}, []string{"datasource_type", "cache", "query_type"})
View Source
var ResourceCachingRequestHistogram = prometheus.NewHistogramVec(prometheus.HistogramOpts{
	Namespace: metrics.ExporterName,
	Subsystem: "caching",
	Name:      "resource_caching_request_duration_seconds",
	Help:      "histogram of grafana resource endpoint requests in seconds",
	Buckets:   []float64{.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10, 25, 50, 100},
}, []string{"plugin_id", "cache"})
View Source
var ShouldCacheQueryHistogram = prometheus.NewHistogramVec(prometheus.HistogramOpts{
	Namespace: metrics.ExporterName,
	Subsystem: "caching",
	Name:      "should_cache_query_request_duration_seconds",
	Help:      "histogram of grafana query endpoint requests in seconds",
	Buckets:   []float64{.005, .01, .025, .05, .1, .25, .5, 1, 2.5, 5, 10, 25, 50, 100},
}, []string{"datasource_type", "cache", "shouldCache", "query_type"})

Functions

func GetGrafanaRequestIDHeaders

func GetGrafanaRequestIDHeaders(req *http.Request, cfg *setting.Cfg, logger log.Logger) map[string]string

func IsRequestURLInAllowList

func IsRequestURLInAllowList(url *url.URL, cfg *setting.Cfg) bool

func NewCachingMiddleware

func NewCachingMiddleware(cachingService caching.CachingService) plugins.ClientMiddleware

NewCachingMiddleware creates a new plugins.ClientMiddleware that will attempt to read and write query results to the cache

func NewCachingMiddlewareWithFeatureManager

func NewCachingMiddlewareWithFeatureManager(cachingService caching.CachingService, features featuremgmt.FeatureToggles) plugins.ClientMiddleware

NewCachingMiddlewareWithFeatureManager creates a new plugins.ClientMiddleware that will attempt to read and write query results to the cache with a feature manager

func NewClearAuthHeadersMiddleware

func NewClearAuthHeadersMiddleware() plugins.ClientMiddleware

NewClearAuthHeadersMiddleware creates a new plugins.ClientMiddleware that will clear any outgoing HTTP headers that was part of the incoming HTTP request and used when authenticating to Grafana.

func NewContextualLoggerMiddleware

func NewContextualLoggerMiddleware() plugins.ClientMiddleware

NewContextualLoggerMiddleware creates a new plugins.ClientMiddleware that adds a contextual logger to the request context.

func NewCookiesMiddleware

func NewCookiesMiddleware(skipCookiesNames []string) plugins.ClientMiddleware

NewCookiesMiddleware creates a new plugins.ClientMiddleware that will forward incoming HTTP request Cookies to outgoing plugins.Client requests if the datasource has enabled forwarding of cookies (keepCookies).

func NewForwardIDMiddleware

func NewForwardIDMiddleware() plugins.ClientMiddleware

NewForwardIDMiddleware creates a new plugins.ClientMiddleware that will set grafana id header on outgoing plugins.Client requests if the feature toggle FlagIdForwarding is enabled

func NewHTTPClientMiddleware

func NewHTTPClientMiddleware() plugins.ClientMiddleware

NewHTTPClientMiddleware creates a new plugins.ClientMiddleware that will forward plugin request headers as outgoing HTTP headers.

func NewHostedGrafanaACHeaderMiddleware

func NewHostedGrafanaACHeaderMiddleware(cfg *setting.Cfg) plugins.ClientMiddleware

NewHostedGrafanaACHeaderMiddleware creates a new plugins.ClientMiddleware that will generate a random request ID, sign it using internal key and populate X-Grafana-Request-ID with the request ID and X-Grafana-Signed-Request-ID with signed request ID. We can then use this to verify that the request is coming from hosted Grafana and is not an external request. This is used for IP range access control.

func NewLoggerMiddleware

func NewLoggerMiddleware(logger plog.Logger) plugins.ClientMiddleware

NewLoggerMiddleware creates a new plugins.ClientMiddleware that will log requests.

func NewMetricsMiddleware

func NewMetricsMiddleware(promRegisterer prometheus.Registerer, pluginRegistry registry.Service) plugins.ClientMiddleware

NewMetricsMiddleware returns a new MetricsMiddleware.

func NewOAuthTokenMiddleware

func NewOAuthTokenMiddleware(oAuthTokenService oauthtoken.OAuthTokenService) plugins.ClientMiddleware

NewOAuthTokenMiddleware creates a new plugins.ClientMiddleware that will set OAuth token headers on outgoing plugins.Client requests if the datasource has enabled Forward OAuth Identity (oauthPassThru).

func NewPluginRequestMetaMiddleware

func NewPluginRequestMetaMiddleware() plugins.ClientMiddleware

NewPluginRequestMetaMiddleware returns a new plugins.ClientMiddleware that sets up the default values for the plugin request meta in the context.Context. All middlewares that are executed after this one are be able to access plugin request meta via the pluginrequestmeta package.

func NewResourceResponseMiddleware

func NewResourceResponseMiddleware() plugins.ClientMiddleware

NewResourceResponseMiddleware creates a new plugins.ClientMiddleware that will enforce HTTP header rules for backend.CallResourceResponse's.

func NewStatusSourceMiddleware

func NewStatusSourceMiddleware() plugins.ClientMiddleware

NewStatusSourceMiddleware returns a new plugins.ClientMiddleware that sets the status source in the plugin request meta stored in the context.Context, according to the query data responses returned by QueryError. If at least one query data response has a "downstream" status source and there isn't one with a "plugin" status source, the plugin request meta in the context is set to "downstream".

func NewTracingHeaderMiddleware

func NewTracingHeaderMiddleware() plugins.ClientMiddleware

NewTracingHeaderMiddleware creates a new plugins.ClientMiddleware that will populate useful tracing headers on outgoing plugins.Client and HTTP requests. Tracing headers are X-Datasource-Uid, X-Dashboard-Uid, X-Panel-Id, X-Grafana-Org-Id.

func NewTracingMiddleware

func NewTracingMiddleware(tracer tracing.Tracer) plugins.ClientMiddleware

NewTracingMiddleware returns a new middleware that creates a new span on every method call.

func NewUserHeaderMiddleware

func NewUserHeaderMiddleware() plugins.ClientMiddleware

NewUserHeaderMiddleware creates a new plugins.ClientMiddleware that will populate the X-Grafana-User header on outgoing plugins.Client requests.

Types

type CachingMiddleware

type CachingMiddleware struct {
	// contains filtered or unexported fields
}

func (*CachingMiddleware) CallResource

CallResource receives a resource request and attempts to access results already stored in the cache for that request. If data is found, it will return it immediately. Otherwise, it will perform the request as usual. The caller of CallResource is expected to explicitly update the cache with any responses. If the cache service is implemented, we capture the request duration as a metric. The service is expected to write any response headers.

func (*CachingMiddleware) CheckHealth

func (m *CachingMiddleware) CheckHealth(ctx context.Context, req *backend.CheckHealthRequest) (*backend.CheckHealthResult, error)

func (*CachingMiddleware) CollectMetrics

func (m *CachingMiddleware) CollectMetrics(ctx context.Context, req *backend.CollectMetricsRequest) (*backend.CollectMetricsResult, error)

func (*CachingMiddleware) ConvertObject

func (m *CachingMiddleware) ConvertObject(ctx context.Context, req *backend.ConversionRequest) (*backend.ConversionResponse, error)

ConvertObject implements backend.AdmissionHandler.

func (*CachingMiddleware) MutateAdmission

func (m *CachingMiddleware) MutateAdmission(ctx context.Context, req *backend.AdmissionRequest) (*backend.MutationResponse, error)

MutateAdmission implements backend.AdmissionHandler.

func (*CachingMiddleware) PublishStream

func (m *CachingMiddleware) PublishStream(ctx context.Context, req *backend.PublishStreamRequest) (*backend.PublishStreamResponse, error)

func (*CachingMiddleware) QueryData

QueryData receives a data request and attempts to access results already stored in the cache for that request. If data is found, it will return it immediately. Otherwise, it will perform the queries as usual, then write the response to the cache. If the cache service is implemented, we capture the request duration as a metric. The service is expected to write any response headers.

func (*CachingMiddleware) RunStream

func (m *CachingMiddleware) RunStream(ctx context.Context, req *backend.RunStreamRequest, sender *backend.StreamSender) error

func (*CachingMiddleware) SubscribeStream

func (m *CachingMiddleware) SubscribeStream(ctx context.Context, req *backend.SubscribeStreamRequest) (*backend.SubscribeStreamResponse, error)

func (*CachingMiddleware) ValidateAdmission

func (m *CachingMiddleware) ValidateAdmission(ctx context.Context, req *backend.AdmissionRequest) (*backend.ValidationResponse, error)

ValidateAdmission implements backend.AdmissionHandler.

type ClearAuthHeadersMiddleware

type ClearAuthHeadersMiddleware struct {
	// contains filtered or unexported fields
}

func (*ClearAuthHeadersMiddleware) CallResource

func (*ClearAuthHeadersMiddleware) CheckHealth

func (*ClearAuthHeadersMiddleware) CollectMetrics

func (m *ClearAuthHeadersMiddleware) CollectMetrics(ctx context.Context, req *backend.CollectMetricsRequest) (*backend.CollectMetricsResult, error)

func (*ClearAuthHeadersMiddleware) ConvertObject

func (m *ClearAuthHeadersMiddleware) ConvertObject(ctx context.Context, req *backend.ConversionRequest) (*backend.ConversionResponse, error)

ConvertObject implements backend.AdmissionHandler.

func (*ClearAuthHeadersMiddleware) MutateAdmission

func (m *ClearAuthHeadersMiddleware) MutateAdmission(ctx context.Context, req *backend.AdmissionRequest) (*backend.MutationResponse, error)

MutateAdmission implements backend.AdmissionHandler.

func (*ClearAuthHeadersMiddleware) PublishStream

func (m *ClearAuthHeadersMiddleware) PublishStream(ctx context.Context, req *backend.PublishStreamRequest) (*backend.PublishStreamResponse, error)

func (*ClearAuthHeadersMiddleware) QueryData

func (*ClearAuthHeadersMiddleware) RunStream

func (m *ClearAuthHeadersMiddleware) RunStream(ctx context.Context, req *backend.RunStreamRequest, sender *backend.StreamSender) error

func (*ClearAuthHeadersMiddleware) SubscribeStream

func (m *ClearAuthHeadersMiddleware) SubscribeStream(ctx context.Context, req *backend.SubscribeStreamRequest) (*backend.SubscribeStreamResponse, error)

func (*ClearAuthHeadersMiddleware) ValidateAdmission

func (m *ClearAuthHeadersMiddleware) ValidateAdmission(ctx context.Context, req *backend.AdmissionRequest) (*backend.ValidationResponse, error)

ValidateAdmission implements backend.AdmissionHandler.

type ContextualLoggerMiddleware

type ContextualLoggerMiddleware struct {
	// contains filtered or unexported fields
}

func (*ContextualLoggerMiddleware) CallResource

func (*ContextualLoggerMiddleware) CheckHealth

func (*ContextualLoggerMiddleware) CollectMetrics

func (*ContextualLoggerMiddleware) ConvertObject

ConvertObject implements backend.AdmissionHandler.

func (*ContextualLoggerMiddleware) MutateAdmission

MutateAdmission implements backend.AdmissionHandler.

func (*ContextualLoggerMiddleware) PublishStream

func (*ContextualLoggerMiddleware) QueryData

func (*ContextualLoggerMiddleware) RunStream

func (*ContextualLoggerMiddleware) SubscribeStream

func (*ContextualLoggerMiddleware) ValidateAdmission

ValidateAdmission implements backend.AdmissionHandler.

type CookiesMiddleware

type CookiesMiddleware struct {
	// contains filtered or unexported fields
}

func (*CookiesMiddleware) CallResource

func (*CookiesMiddleware) CheckHealth

func (*CookiesMiddleware) CollectMetrics

func (m *CookiesMiddleware) CollectMetrics(ctx context.Context, req *backend.CollectMetricsRequest) (*backend.CollectMetricsResult, error)

func (*CookiesMiddleware) ConvertObject

func (m *CookiesMiddleware) ConvertObject(ctx context.Context, req *backend.ConversionRequest) (*backend.ConversionResponse, error)

ConvertObject implements backend.AdmissionHandler.

func (*CookiesMiddleware) MutateAdmission

func (m *CookiesMiddleware) MutateAdmission(ctx context.Context, req *backend.AdmissionRequest) (*backend.MutationResponse, error)

MutateAdmission implements backend.AdmissionHandler.

func (*CookiesMiddleware) PublishStream

func (m *CookiesMiddleware) PublishStream(ctx context.Context, req *backend.PublishStreamRequest) (*backend.PublishStreamResponse, error)

func (*CookiesMiddleware) QueryData

func (*CookiesMiddleware) RunStream

func (m *CookiesMiddleware) RunStream(ctx context.Context, req *backend.RunStreamRequest, sender *backend.StreamSender) error

func (*CookiesMiddleware) SubscribeStream

func (m *CookiesMiddleware) SubscribeStream(ctx context.Context, req *backend.SubscribeStreamRequest) (*backend.SubscribeStreamResponse, error)

func (*CookiesMiddleware) ValidateAdmission

func (m *CookiesMiddleware) ValidateAdmission(ctx context.Context, req *backend.AdmissionRequest) (*backend.ValidationResponse, error)

ValidateAdmission implements backend.AdmissionHandler.

type ForwardIDMiddleware

type ForwardIDMiddleware struct {
	// contains filtered or unexported fields
}

func (*ForwardIDMiddleware) CallResource

func (*ForwardIDMiddleware) CheckHealth

func (*ForwardIDMiddleware) CollectMetrics

func (m *ForwardIDMiddleware) CollectMetrics(ctx context.Context, req *backend.CollectMetricsRequest) (*backend.CollectMetricsResult, error)

func (*ForwardIDMiddleware) ConvertObject

func (m *ForwardIDMiddleware) ConvertObject(ctx context.Context, req *backend.ConversionRequest) (*backend.ConversionResponse, error)

ConvertObject implements backend.AdmissionHandler.

func (*ForwardIDMiddleware) MutateAdmission

func (m *ForwardIDMiddleware) MutateAdmission(ctx context.Context, req *backend.AdmissionRequest) (*backend.MutationResponse, error)

MutateAdmission implements backend.AdmissionHandler.

func (*ForwardIDMiddleware) PublishStream

func (m *ForwardIDMiddleware) PublishStream(ctx context.Context, req *backend.PublishStreamRequest) (*backend.PublishStreamResponse, error)

func (*ForwardIDMiddleware) QueryData

func (*ForwardIDMiddleware) RunStream

func (m *ForwardIDMiddleware) RunStream(ctx context.Context, req *backend.RunStreamRequest, sender *backend.StreamSender) error

func (*ForwardIDMiddleware) SubscribeStream

func (m *ForwardIDMiddleware) SubscribeStream(ctx context.Context, req *backend.SubscribeStreamRequest) (*backend.SubscribeStreamResponse, error)

func (*ForwardIDMiddleware) ValidateAdmission

func (m *ForwardIDMiddleware) ValidateAdmission(ctx context.Context, req *backend.AdmissionRequest) (*backend.ValidationResponse, error)

ValidateAdmission implements backend.AdmissionHandler.

type HTTPClientMiddleware

type HTTPClientMiddleware struct {
	// contains filtered or unexported fields
}

func (*HTTPClientMiddleware) CallResource

func (*HTTPClientMiddleware) CheckHealth

func (*HTTPClientMiddleware) CollectMetrics

func (m *HTTPClientMiddleware) CollectMetrics(ctx context.Context, req *backend.CollectMetricsRequest) (*backend.CollectMetricsResult, error)

func (*HTTPClientMiddleware) ConvertObject

func (m *HTTPClientMiddleware) ConvertObject(ctx context.Context, req *backend.ConversionRequest) (*backend.ConversionResponse, error)

ConvertObject implements backend.AdmissionHandler.

func (*HTTPClientMiddleware) MutateAdmission

func (m *HTTPClientMiddleware) MutateAdmission(ctx context.Context, req *backend.AdmissionRequest) (*backend.MutationResponse, error)

MutateAdmission implements backend.AdmissionHandler.

func (*HTTPClientMiddleware) PublishStream

func (m *HTTPClientMiddleware) PublishStream(ctx context.Context, req *backend.PublishStreamRequest) (*backend.PublishStreamResponse, error)

func (*HTTPClientMiddleware) QueryData

func (*HTTPClientMiddleware) RunStream

func (m *HTTPClientMiddleware) RunStream(ctx context.Context, req *backend.RunStreamRequest, sender *backend.StreamSender) error

func (*HTTPClientMiddleware) SubscribeStream

func (m *HTTPClientMiddleware) SubscribeStream(ctx context.Context, req *backend.SubscribeStreamRequest) (*backend.SubscribeStreamResponse, error)

func (*HTTPClientMiddleware) ValidateAdmission

func (m *HTTPClientMiddleware) ValidateAdmission(ctx context.Context, req *backend.AdmissionRequest) (*backend.ValidationResponse, error)

ValidateAdmission implements backend.AdmissionHandler.

type HostedGrafanaACHeaderMiddleware

type HostedGrafanaACHeaderMiddleware struct {
	// contains filtered or unexported fields
}

func (*HostedGrafanaACHeaderMiddleware) CallResource

func (*HostedGrafanaACHeaderMiddleware) CheckHealth

func (*HostedGrafanaACHeaderMiddleware) CollectMetrics

func (m *HostedGrafanaACHeaderMiddleware) CollectMetrics(ctx context.Context, req *backend.CollectMetricsRequest) (*backend.CollectMetricsResult, error)

func (*HostedGrafanaACHeaderMiddleware) ConvertObject

func (m *HostedGrafanaACHeaderMiddleware) ConvertObject(ctx context.Context, req *backend.ConversionRequest) (*backend.ConversionResponse, error)

ConvertObject implements backend.AdmissionHandler.

func (*HostedGrafanaACHeaderMiddleware) MutateAdmission

func (m *HostedGrafanaACHeaderMiddleware) MutateAdmission(ctx context.Context, req *backend.AdmissionRequest) (*backend.MutationResponse, error)

MutateAdmission implements backend.AdmissionHandler.

func (*HostedGrafanaACHeaderMiddleware) PublishStream

func (m *HostedGrafanaACHeaderMiddleware) PublishStream(ctx context.Context, req *backend.PublishStreamRequest) (*backend.PublishStreamResponse, error)

func (*HostedGrafanaACHeaderMiddleware) QueryData

func (*HostedGrafanaACHeaderMiddleware) RunStream

func (m *HostedGrafanaACHeaderMiddleware) RunStream(ctx context.Context, req *backend.RunStreamRequest, sender *backend.StreamSender) error

func (*HostedGrafanaACHeaderMiddleware) SubscribeStream

func (m *HostedGrafanaACHeaderMiddleware) SubscribeStream(ctx context.Context, req *backend.SubscribeStreamRequest) (*backend.SubscribeStreamResponse, error)

func (*HostedGrafanaACHeaderMiddleware) ValidateAdmission

func (m *HostedGrafanaACHeaderMiddleware) ValidateAdmission(ctx context.Context, req *backend.AdmissionRequest) (*backend.ValidationResponse, error)

ValidateAdmission implements backend.AdmissionHandler.

type LoggerMiddleware

type LoggerMiddleware struct {
	// contains filtered or unexported fields
}

func (*LoggerMiddleware) CallResource

func (*LoggerMiddleware) CheckHealth

func (*LoggerMiddleware) CollectMetrics

func (*LoggerMiddleware) ConvertObject

func (m *LoggerMiddleware) ConvertObject(ctx context.Context, req *backend.ConversionRequest) (*backend.ConversionResponse, error)

ConvertObject implements backend.AdmissionHandler.

func (*LoggerMiddleware) MutateAdmission

func (m *LoggerMiddleware) MutateAdmission(ctx context.Context, req *backend.AdmissionRequest) (*backend.MutationResponse, error)

MutateAdmission implements backend.AdmissionHandler.

func (*LoggerMiddleware) PublishStream

func (m *LoggerMiddleware) PublishStream(ctx context.Context, req *backend.PublishStreamRequest) (*backend.PublishStreamResponse, error)

func (*LoggerMiddleware) QueryData

func (*LoggerMiddleware) RunStream

func (m *LoggerMiddleware) RunStream(ctx context.Context, req *backend.RunStreamRequest, sender *backend.StreamSender) error

func (*LoggerMiddleware) SubscribeStream

func (m *LoggerMiddleware) SubscribeStream(ctx context.Context, req *backend.SubscribeStreamRequest) (*backend.SubscribeStreamResponse, error)

func (*LoggerMiddleware) ValidateAdmission

func (m *LoggerMiddleware) ValidateAdmission(ctx context.Context, req *backend.AdmissionRequest) (*backend.ValidationResponse, error)

ValidateAdmission implements backend.AdmissionHandler.

type MetricsMiddleware

type MetricsMiddleware struct {
	// contains filtered or unexported fields
}

MetricsMiddleware is a middleware that instruments plugin requests. It tracks requests count, duration and size as prometheus metrics.

func (*MetricsMiddleware) CallResource

func (*MetricsMiddleware) CheckHealth

func (*MetricsMiddleware) CollectMetrics

func (*MetricsMiddleware) ConvertObject

func (*MetricsMiddleware) MutateAdmission

func (*MetricsMiddleware) PublishStream

func (m *MetricsMiddleware) PublishStream(ctx context.Context, req *backend.PublishStreamRequest) (*backend.PublishStreamResponse, error)

func (*MetricsMiddleware) QueryData

func (*MetricsMiddleware) RunStream

func (m *MetricsMiddleware) RunStream(ctx context.Context, req *backend.RunStreamRequest, sender *backend.StreamSender) error

func (*MetricsMiddleware) SubscribeStream

func (m *MetricsMiddleware) SubscribeStream(ctx context.Context, req *backend.SubscribeStreamRequest) (*backend.SubscribeStreamResponse, error)

func (*MetricsMiddleware) ValidateAdmission

type OAuthTokenMiddleware

type OAuthTokenMiddleware struct {
	// contains filtered or unexported fields
}

func (*OAuthTokenMiddleware) CallResource

func (*OAuthTokenMiddleware) CheckHealth

func (*OAuthTokenMiddleware) CollectMetrics

func (m *OAuthTokenMiddleware) CollectMetrics(ctx context.Context, req *backend.CollectMetricsRequest) (*backend.CollectMetricsResult, error)

func (*OAuthTokenMiddleware) ConvertObject

func (m *OAuthTokenMiddleware) ConvertObject(ctx context.Context, req *backend.ConversionRequest) (*backend.ConversionResponse, error)

ConvertObject implements backend.AdmissionHandler.

func (*OAuthTokenMiddleware) MutateAdmission

func (m *OAuthTokenMiddleware) MutateAdmission(ctx context.Context, req *backend.AdmissionRequest) (*backend.MutationResponse, error)

MutateAdmission implements backend.AdmissionHandler.

func (*OAuthTokenMiddleware) PublishStream

func (m *OAuthTokenMiddleware) PublishStream(ctx context.Context, req *backend.PublishStreamRequest) (*backend.PublishStreamResponse, error)

func (*OAuthTokenMiddleware) QueryData

func (*OAuthTokenMiddleware) RunStream

func (m *OAuthTokenMiddleware) RunStream(ctx context.Context, req *backend.RunStreamRequest, sender *backend.StreamSender) error

func (*OAuthTokenMiddleware) SubscribeStream

func (m *OAuthTokenMiddleware) SubscribeStream(ctx context.Context, req *backend.SubscribeStreamRequest) (*backend.SubscribeStreamResponse, error)

func (*OAuthTokenMiddleware) ValidateAdmission

func (m *OAuthTokenMiddleware) ValidateAdmission(ctx context.Context, req *backend.AdmissionRequest) (*backend.ValidationResponse, error)

ValidateAdmission implements backend.AdmissionHandler.

type PluginRequestMetaMiddleware

type PluginRequestMetaMiddleware struct {
	// contains filtered or unexported fields
}

func (*PluginRequestMetaMiddleware) CallResource

func (*PluginRequestMetaMiddleware) CheckHealth

func (*PluginRequestMetaMiddleware) CollectMetrics

func (*PluginRequestMetaMiddleware) ConvertObject

ConvertObject implements backend.AdmissionHandler.

func (*PluginRequestMetaMiddleware) MutateAdmission

MutateAdmission implements backend.AdmissionHandler.

func (*PluginRequestMetaMiddleware) PublishStream

func (*PluginRequestMetaMiddleware) QueryData

func (*PluginRequestMetaMiddleware) RunStream

func (*PluginRequestMetaMiddleware) SubscribeStream

func (*PluginRequestMetaMiddleware) ValidateAdmission

ValidateAdmission implements backend.AdmissionHandler.

type ResourceResponseMiddleware

type ResourceResponseMiddleware struct {
	// contains filtered or unexported fields
}

func (*ResourceResponseMiddleware) CallResource

func (*ResourceResponseMiddleware) CheckHealth

func (m *ResourceResponseMiddleware) CheckHealth(ctx context.Context, req *backend.CheckHealthRequest) (*backend.CheckHealthResult, error)

func (*ResourceResponseMiddleware) CollectMetrics

func (m *ResourceResponseMiddleware) CollectMetrics(ctx context.Context, req *backend.CollectMetricsRequest) (*backend.CollectMetricsResult, error)

func (*ResourceResponseMiddleware) ConvertObject

func (m *ResourceResponseMiddleware) ConvertObject(ctx context.Context, req *backend.ConversionRequest) (*backend.ConversionResponse, error)

ConvertObject implements backend.AdmissionHandler.

func (*ResourceResponseMiddleware) MutateAdmission

func (m *ResourceResponseMiddleware) MutateAdmission(ctx context.Context, req *backend.AdmissionRequest) (*backend.MutationResponse, error)

MutateAdmission implements backend.AdmissionHandler.

func (*ResourceResponseMiddleware) PublishStream

func (m *ResourceResponseMiddleware) PublishStream(ctx context.Context, req *backend.PublishStreamRequest) (*backend.PublishStreamResponse, error)

func (*ResourceResponseMiddleware) QueryData

func (*ResourceResponseMiddleware) RunStream

func (m *ResourceResponseMiddleware) RunStream(ctx context.Context, req *backend.RunStreamRequest, sender *backend.StreamSender) error

func (*ResourceResponseMiddleware) SubscribeStream

func (m *ResourceResponseMiddleware) SubscribeStream(ctx context.Context, req *backend.SubscribeStreamRequest) (*backend.SubscribeStreamResponse, error)

func (*ResourceResponseMiddleware) ValidateAdmission

func (m *ResourceResponseMiddleware) ValidateAdmission(ctx context.Context, req *backend.AdmissionRequest) (*backend.ValidationResponse, error)

ValidateAdmission implements backend.AdmissionHandler.

type StatusSourceMiddleware

type StatusSourceMiddleware struct {
	// contains filtered or unexported fields
}

func (*StatusSourceMiddleware) CallResource

func (m *StatusSourceMiddleware) CallResource(ctx context.Context, req *backend.CallResourceRequest, sender backend.CallResourceResponseSender) error

func (*StatusSourceMiddleware) CheckHealth

func (m *StatusSourceMiddleware) CheckHealth(ctx context.Context, req *backend.CheckHealthRequest) (*backend.CheckHealthResult, error)

func (*StatusSourceMiddleware) CollectMetrics

func (m *StatusSourceMiddleware) CollectMetrics(ctx context.Context, req *backend.CollectMetricsRequest) (*backend.CollectMetricsResult, error)

func (*StatusSourceMiddleware) ConvertObject

func (m *StatusSourceMiddleware) ConvertObject(ctx context.Context, req *backend.ConversionRequest) (*backend.ConversionResponse, error)

ConvertObject implements backend.AdmissionHandler.

func (*StatusSourceMiddleware) MutateAdmission

func (m *StatusSourceMiddleware) MutateAdmission(ctx context.Context, req *backend.AdmissionRequest) (*backend.MutationResponse, error)

MutateAdmission implements backend.AdmissionHandler.

func (*StatusSourceMiddleware) PublishStream

func (m *StatusSourceMiddleware) PublishStream(ctx context.Context, req *backend.PublishStreamRequest) (*backend.PublishStreamResponse, error)

func (*StatusSourceMiddleware) QueryData

func (*StatusSourceMiddleware) RunStream

func (m *StatusSourceMiddleware) RunStream(ctx context.Context, req *backend.RunStreamRequest, sender *backend.StreamSender) error

func (*StatusSourceMiddleware) SubscribeStream

func (m *StatusSourceMiddleware) SubscribeStream(ctx context.Context, req *backend.SubscribeStreamRequest) (*backend.SubscribeStreamResponse, error)

func (*StatusSourceMiddleware) ValidateAdmission

func (m *StatusSourceMiddleware) ValidateAdmission(ctx context.Context, req *backend.AdmissionRequest) (*backend.ValidationResponse, error)

ValidateAdmission implements backend.AdmissionHandler.

type TracingHeaderMiddleware

type TracingHeaderMiddleware struct {
	// contains filtered or unexported fields
}

func (*TracingHeaderMiddleware) CallResource

func (*TracingHeaderMiddleware) CheckHealth

func (*TracingHeaderMiddleware) CollectMetrics

func (m *TracingHeaderMiddleware) CollectMetrics(ctx context.Context, req *backend.CollectMetricsRequest) (*backend.CollectMetricsResult, error)

func (*TracingHeaderMiddleware) ConvertObject

func (m *TracingHeaderMiddleware) ConvertObject(ctx context.Context, req *backend.ConversionRequest) (*backend.ConversionResponse, error)

ConvertObject implements backend.AdmissionHandler.

func (*TracingHeaderMiddleware) MutateAdmission

func (m *TracingHeaderMiddleware) MutateAdmission(ctx context.Context, req *backend.AdmissionRequest) (*backend.MutationResponse, error)

MutateAdmission implements backend.AdmissionHandler.

func (*TracingHeaderMiddleware) PublishStream

func (m *TracingHeaderMiddleware) PublishStream(ctx context.Context, req *backend.PublishStreamRequest) (*backend.PublishStreamResponse, error)

func (*TracingHeaderMiddleware) QueryData

func (*TracingHeaderMiddleware) RunStream

func (m *TracingHeaderMiddleware) RunStream(ctx context.Context, req *backend.RunStreamRequest, sender *backend.StreamSender) error

func (*TracingHeaderMiddleware) SubscribeStream

func (m *TracingHeaderMiddleware) SubscribeStream(ctx context.Context, req *backend.SubscribeStreamRequest) (*backend.SubscribeStreamResponse, error)

func (*TracingHeaderMiddleware) ValidateAdmission

func (m *TracingHeaderMiddleware) ValidateAdmission(ctx context.Context, req *backend.AdmissionRequest) (*backend.ValidationResponse, error)

ValidateAdmission implements backend.AdmissionHandler.

type TracingMiddleware

type TracingMiddleware struct {
	// contains filtered or unexported fields
}

func (*TracingMiddleware) CallResource

func (*TracingMiddleware) CheckHealth

func (*TracingMiddleware) CollectMetrics

func (*TracingMiddleware) ConvertObject

ConvertObject implements backend.AdmissionHandler.

func (*TracingMiddleware) MutateAdmission

MutateAdmission implements backend.AdmissionHandler.

func (*TracingMiddleware) PublishStream

func (*TracingMiddleware) QueryData

func (*TracingMiddleware) RunStream

func (*TracingMiddleware) SubscribeStream

func (*TracingMiddleware) ValidateAdmission

ValidateAdmission implements backend.AdmissionHandler.

type UserHeaderMiddleware

type UserHeaderMiddleware struct {
	// contains filtered or unexported fields
}

func (*UserHeaderMiddleware) CallResource

func (*UserHeaderMiddleware) CheckHealth

func (*UserHeaderMiddleware) CollectMetrics

func (m *UserHeaderMiddleware) CollectMetrics(ctx context.Context, req *backend.CollectMetricsRequest) (*backend.CollectMetricsResult, error)

func (*UserHeaderMiddleware) ConvertObject

func (m *UserHeaderMiddleware) ConvertObject(ctx context.Context, req *backend.ConversionRequest) (*backend.ConversionResponse, error)

ConvertObject implements backend.AdmissionHandler.

func (*UserHeaderMiddleware) MutateAdmission

func (m *UserHeaderMiddleware) MutateAdmission(ctx context.Context, req *backend.AdmissionRequest) (*backend.MutationResponse, error)

MutateAdmission implements backend.AdmissionHandler.

func (*UserHeaderMiddleware) PublishStream

func (m *UserHeaderMiddleware) PublishStream(ctx context.Context, req *backend.PublishStreamRequest) (*backend.PublishStreamResponse, error)

func (*UserHeaderMiddleware) QueryData

func (*UserHeaderMiddleware) RunStream

func (m *UserHeaderMiddleware) RunStream(ctx context.Context, req *backend.RunStreamRequest, sender *backend.StreamSender) error

func (*UserHeaderMiddleware) SubscribeStream

func (m *UserHeaderMiddleware) SubscribeStream(ctx context.Context, req *backend.SubscribeStreamRequest) (*backend.SubscribeStreamResponse, error)

func (*UserHeaderMiddleware) ValidateAdmission

func (m *UserHeaderMiddleware) ValidateAdmission(ctx context.Context, req *backend.AdmissionRequest) (*backend.ValidationResponse, error)

ValidateAdmission implements backend.AdmissionHandler.

Jump to

Keyboard shortcuts

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