types

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package types contains types and validation functions for workloads in ToolHive. This is separated to avoid circular dependencies with the core package.

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidWorkloadName = fmt.Errorf("invalid workload name")

ErrInvalidWorkloadName is returned when a workload name fails validation.

Functions

func MatchesLabelFilters

func MatchesLabelFilters(workloadLabels, filters map[string]string) bool

MatchesLabelFilters checks if workload labels match all the specified filters

func ParseLabelFilters

func ParseLabelFilters(labelFilters []string) (map[string]string, error)

ParseLabelFilters parses label filters from a slice of strings and validates them.

func ValidateWorkloadName

func ValidateWorkloadName(name string) error

ValidateWorkloadName checks if the provided workload name is valid.

func WorkloadFromContainerInfo

func WorkloadFromContainerInfo(container *runtime.ContainerInfo) (core.Workload, error)

WorkloadFromContainerInfo creates a Workload struct from the runtime container info.

Types

This section is empty.

Jump to

Keyboard shortcuts

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