metadata

package
v2.2.6 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2026 License: Apache-2.0 Imports: 3 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (

	// AnnotationKeyTags is the annotation key used to set tags on resources.
	AnnotationKeyTags = annotationPrefix + "/tags"

	// AnnotationKeyPlugins is the annotation key used to attach KongPlugins to resources.
	AnnotationKeyPlugins = annotationPrefix + "/plugins"
)

Variables

This section is empty.

Functions

func ExtractPlugins

func ExtractPlugins(obj ObjectWithAnnotationsAndNamespace) []string

ExtractPlugins extracts plugin names from the given object's konghq.com/plugins annotation. This function trims the whitespace from the plugin names.

For example, for KongConsumer in namespace default, having the "konghq.com/plugins" annotation set to "p1,p2" this will return []string{"p1", "p2"}.

func ExtractPluginsNamespacedNames

func ExtractPluginsNamespacedNames(obj ObjectWithAnnotationsAndNamespace) []types.NamespacedName

ExtractPluginsNamespacedNames extracts plugin namespaced names from the given object's konghq.com/plugins annotation. Plugins can optionally specify the namespace using the "<namespace>:<plugin-name>" format. This function trims the whitespace from the plugin names.

For example, for an object having the "konghq.com/plugins" annotation set to "default:p1,p2" this will return:

 []types.NamespacedName{
		types.NamespacedName{Namespace: "default", Name: "p1"},
		types.NamespacedName{Namespace: "", Name: "p2"},
	}

func ExtractPluginsWithNamespaces

func ExtractPluginsWithNamespaces(obj ObjectWithAnnotationsAndNamespace) []string

ExtractPluginsWithNamespaces extracts plugin namespaced names from the given object's konghq.com/plugins annotation. This function trims the whitespace from the plugin names.

For example, for KongConsumer in namespace default, having the "konghq.com/plugins" annotation set to "p1,p2" this will return []string{"default/p1", "default/p2"}.

Types

type ObjectWithAnnotations

type ObjectWithAnnotations interface {
	GetAnnotations() map[string]string
}

ObjectWithAnnotations is an interface that provides a method to get annotations.

type ObjectWithAnnotationsAndNamespace

type ObjectWithAnnotationsAndNamespace interface {
	ObjectWithAnnotations
	GetNamespace() string
}

ObjectWithAnnotationsAndNamespace is an interface that provides a method to get annotations and namespace.

Jump to

Keyboard shortcuts

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