labels

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: May 22, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package labels provides label parsing for labelgate.

Index

Constants

View Source
const (
	// DefaultPrefix is the default label prefix.
	DefaultPrefix = "labelgate"

	// TypeDNS is the DNS label type.
	TypeDNS = "dns"
	// TypeTunnel is the Tunnel label type.
	TypeTunnel = "tunnel"
	// TypeAccess is the Access label type (Phase 4).
	TypeAccess = "access"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type HostnameConflictError

type HostnameConflictError struct {
	Hostname      string
	DNSService    string
	TunnelService string
}

HostnameConflictError represents a hostname conflict between DNS and Tunnel.

func (*HostnameConflictError) Error

func (e *HostnameConflictError) Error() string

type ParseResult

type ParseResult struct {
	DNSServices    []*types.DNSService
	TunnelServices []*types.TunnelService
	AccessPolicies map[string]*types.AccessPolicyDef // policy_name -> definition
	Errors         []error
}

ParseResult contains the parsed DNS, Tunnel, and Access services.

type Parser

type Parser struct {
	// contains filtered or unexported fields
}

Parser parses container labels into service configurations.

func NewParser

func NewParser(prefix string) *Parser

NewParser creates a new label parser with the given prefix.

func (*Parser) CheckHostnameConflict

func (p *Parser) CheckHostnameConflict(result *ParseResult) error

CheckHostnameConflict checks if the same hostname is configured for both DNS and Tunnel.

func (*Parser) Parse

func (p *Parser) Parse(labels map[string]string) *ParseResult

Parse parses container labels into service configurations.

Jump to

Keyboard shortcuts

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