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 ¶
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
Click to show internal directories.
Click to hide internal directories.