mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 19:52:38 +08:00
Plugins: Add support for ResourceConversion (#91977)
This commit is contained in:
@ -20,6 +20,7 @@ type pluginClient interface {
|
||||
backend.QueryDataHandler
|
||||
backend.CallResourceHandler
|
||||
backend.AdmissionHandler
|
||||
backend.ConversionHandler
|
||||
backend.StreamHandler
|
||||
}
|
||||
|
||||
@ -217,10 +218,10 @@ func (p *grpcPlugin) MutateAdmission(ctx context.Context, request *backend.Admis
|
||||
return pluginClient.MutateAdmission(ctx, request)
|
||||
}
|
||||
|
||||
func (p *grpcPlugin) ConvertObject(ctx context.Context, request *backend.ConversionRequest) (*backend.ConversionResponse, error) {
|
||||
func (p *grpcPlugin) ConvertObjects(ctx context.Context, request *backend.ConversionRequest) (*backend.ConversionResponse, error) {
|
||||
pluginClient, ok := p.getPluginClient()
|
||||
if !ok {
|
||||
return nil, plugins.ErrPluginUnavailable
|
||||
}
|
||||
return pluginClient.ConvertObject(ctx, request)
|
||||
return pluginClient.ConvertObjects(ctx, request)
|
||||
}
|
||||
|
Reference in New Issue
Block a user