Skip to content

Commit

Permalink
add context to signatures
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenctl committed Jul 24, 2024
1 parent 00b3212 commit c8b4bbe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions projects/gateway2/extensions/extensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ import (
// which have Enterprise variants.
type K8sGatewayExtensions interface {
// CreatePluginRegistry exposes the plugins supported by this implementation.
CreatePluginRegistry() registry.PluginRegistry
CreatePluginRegistry(context.Context) registry.PluginRegistry

// GetTranslator allows an extension to provide custom translation for
// different gateway classes.
GetTranslator(*apiv1.Gateway, registry.PluginRegistry) translator.K8sGwTranslator
GetTranslator(context.Context, *apiv1.Gateway, registry.PluginRegistry) translator.K8sGwTranslator
}

// K8sGatewayExtensionsFactoryParameters contains the parameters required to start Gloo K8s Gateway Extensions (including Translator Plugins)
Expand Down Expand Up @@ -69,11 +69,11 @@ type k8sGatewayExtensions struct {
queries query.GatewayQueries
}

func (e *k8sGatewayExtensions) GetTranslator(_ *apiv1.Gateway, pluginRegistry registry.PluginRegistry) translator.K8sGwTranslator {
func (e *k8sGatewayExtensions) GetTranslator(_ context.Context, _ *apiv1.Gateway, pluginRegistry registry.PluginRegistry) translator.K8sGwTranslator {
return translator.NewTranslator(e.queries, pluginRegistry)
}

func (e *k8sGatewayExtensions) CreatePluginRegistry() registry.PluginRegistry {
func (e *k8sGatewayExtensions) CreatePluginRegistry(_ context.Context) registry.PluginRegistry {
plugins := registry.BuildPlugins(
e.queries,
e.mgr.GetClient(),
Expand Down

0 comments on commit c8b4bbe

Please sign in to comment.