selector

package
v1.0.2 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: ? modules, 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

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