selector

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package selector implements label selector matching for Plugin-to-PaperMCServer relationships.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindMatchingPlugins

func FindMatchingPlugins(
	ctx context.Context,
	c client.Client,
	namespace string,
	serverLabels map[string]string,
) ([]mcv1beta1.Plugin, error)

FindMatchingPlugins finds all Plugin resources in a namespace whose instanceSelector matches the server labels. Returns a list of matching plugins or an error if the query fails.

func FindMatchingServers

func FindMatchingServers(
	ctx context.Context,
	c client.Client,
	namespace string,
	selector metav1.LabelSelector,
) ([]mcv1beta1.PaperMCServer, error)

FindMatchingServers finds all PaperMCServer resources in a namespace that match the given selector. Returns a list of matching servers or an error if the query fails.

func MatchesSelector

func MatchesSelector(labelSet map[string]string, selector metav1.LabelSelector) (bool, error)

MatchesSelector checks if a set of labels matches a label selector. Returns true if the labels match the selector, false otherwise.

Types

This section is empty.

Jump to

Keyboard shortcuts

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