config

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label prefix for all roji-related labels
	LabelPrefix = "roji."

	// Supported labels
	LabelHost = LabelPrefix + "host" // Custom hostname (default: {service}.{domain})
	LabelPort = LabelPrefix + "port" // Target port when multiple ports exposed
	LabelPath = LabelPrefix + "path" // Path prefix for routing (optional)
)

Variables

This section is empty.

Functions

func DefaultHostname

func DefaultHostname(serviceName, baseDomain string) string

DefaultHostname generates a default hostname from service name and base domain e.g., ("myapp", "kan.localhost") -> "myapp.kan.localhost"

Types

type RouteConfig

type RouteConfig struct {
	Host       string // e.g., "myapp.localhost"
	Port       int    // Target port
	PathPrefix string // e.g., "/api" (optional)
}

RouteConfig holds the configuration for a single route

func ParseLabels

func ParseLabels(labels map[string]string) *RouteConfig

ParseLabels extracts roji configuration from container labels

Jump to

Keyboard shortcuts

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