Plugins: Use handler middleware from the SDK (#93445)
updates sdk to v0.251.0
This commit is contained in:
committed by
GitHub
parent
54faa541c3
commit
b7a7f2bd62
+1
-24
@@ -88,13 +88,7 @@ type FoundPlugin struct {
|
||||
|
||||
// Client is used to communicate with backend plugin implementations.
|
||||
type Client interface {
|
||||
backend.QueryDataHandler
|
||||
backend.CheckHealthHandler
|
||||
backend.StreamHandler
|
||||
backend.AdmissionHandler
|
||||
backend.ConversionHandler
|
||||
backend.CallResourceHandler
|
||||
backend.CollectMetricsHandler
|
||||
backend.Handler
|
||||
}
|
||||
|
||||
// BackendFactoryProvider provides a backend factory for a provided plugin.
|
||||
@@ -131,23 +125,6 @@ type Licensing interface {
|
||||
AppURL() string
|
||||
}
|
||||
|
||||
// ClientMiddleware is an interface representing the ability to create a middleware
|
||||
// that implements the Client interface.
|
||||
type ClientMiddleware interface {
|
||||
// CreateClientMiddleware creates a new client middleware.
|
||||
CreateClientMiddleware(next Client) Client
|
||||
}
|
||||
|
||||
// The ClientMiddlewareFunc type is an adapter to allow the use of ordinary
|
||||
// functions as ClientMiddleware's. If f is a function with the appropriate
|
||||
// signature, ClientMiddlewareFunc(f) is a ClientMiddleware that calls f.
|
||||
type ClientMiddlewareFunc func(next Client) Client
|
||||
|
||||
// CreateClientMiddleware implements the ClientMiddleware interface.
|
||||
func (fn ClientMiddlewareFunc) CreateClientMiddleware(next Client) Client {
|
||||
return fn(next)
|
||||
}
|
||||
|
||||
type SignatureCalculator interface {
|
||||
Calculate(ctx context.Context, src PluginSource, plugin FoundPlugin) (Signature, error)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user