Help us shape the future of Go! Take the 2026 Go Developer Survey

labels

package
v0.0.3 Latest Latest
Warning

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

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

Documentation

Overview

Package labels provides utilities for managing container labels used by the toolhive application.

Index

Constants

View Source
const (
	// LabelPrefix is the prefix for all ToolHive labels
	LabelPrefix = "toolhive"

	// LabelEnabled is the label that indicates a container is managed by ToolHive
	LabelEnabled = "toolhive"

	// LabelName is the label that contains the container name
	LabelName = "toolhive-name"

	// LabelBaseName is the label that contains the base container name (without timestamp)
	LabelBaseName = "toolhive-basename"

	// LabelTransport is the label that contains the transport mode
	LabelTransport = "toolhive-transport"

	// LabelPort is the label that contains the port
	LabelPort = "toolhive-port"

	// LabelToolType is the label that indicates the type of tool
	LabelToolType = "toolhive-tool-type"
)

Variables

This section is empty.

Functions

func AddStandardLabels

func AddStandardLabels(labels map[string]string, containerName, containerBaseName, transportType string, port int)

AddStandardLabels adds standard labels to a container

func FormatToolHiveFilter

func FormatToolHiveFilter() string

FormatToolHiveFilter formats a filter for ToolHive containers

func GetContainerBaseName

func GetContainerBaseName(labels map[string]string) string

GetContainerBaseName gets the base container name from labels

func GetContainerName

func GetContainerName(labels map[string]string) string

GetContainerName gets the container name from labels

func GetPort

func GetPort(labels map[string]string) (int, error)

GetPort gets the port from labels

func GetToolType

func GetToolType(labels map[string]string) string

GetToolType gets the tool type from labels

func GetTransportType

func GetTransportType(labels map[string]string) string

GetTransportType gets the transport type from labels

func IsToolHiveContainer

func IsToolHiveContainer(labels map[string]string) bool

IsToolHiveContainer checks if a container is managed by ToolHive

Types

This section is empty.

Jump to

Keyboard shortcuts

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