label

package
v0.9.9 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package label is to handle label selector for resources

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateOrUpdateLabel

func CreateOrUpdateLabel(labelType, uuid string, resourceKey string, labels map[string]string) error

CreateOrUpdateLabel adds a new label or updates an existing label for the given resource, and then persists the updated label information in the Key-Value store.

func GetLabels

func GetLabels(labelType, uuid string) (lable model.LabelInfo, err error)

GetLabels retrieves the labels for a resource identified by its UUID.

func GetResourcesByLabelSelector

func GetResourcesByLabelSelector(labelType, labelSelector string) ([]interface{}, error)

GetResourcesByLabelSelector retrieves resources based on a label selector.

func MatchesLabelSelector

func MatchesLabelSelector(labels map[string]string, labelSelector string) bool

MatchesLabelSelector checks if the labels match the given label selector.

func RemoveLabel

func RemoveLabel(labelType, uuid, key string) error

RemoveLabel removes a label from a resource identified by its UUID.

Types

This section is empty.

Jump to

Keyboard shortcuts

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