traefik

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnableJSONLogging

func EnableJSONLogging(client *ssh.Client, verbose bool) error

EnableJSONLogging configures Traefik to use JSON format for access logs

func GetAccessLogFormat

func GetAccessLogFormat(client *ssh.Client) (string, error)

GetAccessLogFormat returns the configured access log format

Types

type Manager

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

Manager handles Traefik proxy configuration for Swarm deployments

func NewManager

func NewManager(client *ssh.Client, projectName, environment string, verbose bool) *Manager

NewManager creates a new Traefik manager

func (*Manager) DisconnectFromNetwork

func (m *Manager) DisconnectFromNetwork(networkName string) error

DisconnectFromNetwork disconnects Traefik from a network (for cleanup)

func (*Manager) EnsureTraefikContainer

func (m *Manager) EnsureTraefikContainer(networkName, email string) error

EnsureTraefikContainer ensures Traefik is running as a Docker container (single-server mode)

func (*Manager) EnsureTraefikService

func (m *Manager) EnsureTraefikService(networkName string) error

EnsureTraefikService ensures Traefik is running as a Swarm service

func (*Manager) GetContainerLabels

func (m *Manager) GetContainerLabels(containerName string, service *config.ServiceConfig) string

GetContainerLabels returns Traefik labels for container creation (single-server mode) Returns a space-separated string of --label flags to be used with docker run

func (*Manager) GetServiceLabels

func (m *Manager) GetServiceLabels(serviceName string, service *config.ServiceConfig, fullServiceName string) []string

GetServiceLabels returns Traefik labels for service creation This avoids service updates which can cause brief Traefik config reload disruptions

func (*Manager) GetTraefikDashboardURL

func (m *Manager) GetTraefikDashboardURL(host string) string

GetTraefikDashboardURL returns the Traefik dashboard URL

func (*Manager) RemoveServiceLabels

func (m *Manager) RemoveServiceLabels(fullServiceName string) error

RemoveServiceLabels removes Traefik labels from a service

func (*Manager) UpdateServiceLabels

func (m *Manager) UpdateServiceLabels(serviceName string, service *config.ServiceConfig, fullServiceName string) error

UpdateServiceLabels adds Traefik labels to a service for automatic discovery DEPRECATED: Use GetServiceLabels during service creation to avoid disruptions

Jump to

Keyboard shortcuts

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