traefik

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TraefikContainerName = "doku-traefik"
	TraefikImage         = "traefik:v2.10"
	TraefikVersion       = "2.10"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Domain             string
	Protocol           string
	HTTPPort           int
	HTTPSPort          int
	DashboardEnabled   bool
	CertificatePath    string
	CertificateKeyPath string
}

Config represents Traefik configuration

type Manager

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

Manager handles Traefik setup and configuration

func NewManager

func NewManager(dockerClient *docker.Client, configDir, certsDir, domain, protocol string) *Manager

NewManager creates a new Traefik manager

func (*Manager) BackupConfig

func (m *Manager) BackupConfig() (string, error)

BackupConfig creates a backup of the current configuration

func (*Manager) ConfigExists

func (m *Manager) ConfigExists() bool

ConfigExists checks if Traefik configuration file exists

func (*Manager) EnsureRunning

func (m *Manager) EnsureRunning() error

EnsureRunning ensures Traefik is running, starts it if not

func (*Manager) GenerateConfig

func (m *Manager) GenerateConfig() error

GenerateConfig generates Traefik configuration file

func (*Manager) GenerateDynamicConfig

func (m *Manager) GenerateDynamicConfig() error

GenerateDynamicConfig generates dynamic configuration for Traefik

func (*Manager) GetConfig

func (m *Manager) GetConfig() (string, error)

GetConfig reads and returns the current Traefik configuration

func (*Manager) GetConfigPath

func (m *Manager) GetConfigPath() string

GetConfigPath returns the path to the Traefik configuration file

func (*Manager) GetDashboardURL

func (m *Manager) GetDashboardURL() string

GetDashboardURL returns the Traefik dashboard URL

func (*Manager) GetStatus

func (m *Manager) GetStatus() (map[string]interface{}, error)

GetStatus returns the status of Traefik

func (*Manager) IsRunning

func (m *Manager) IsRunning() (bool, error)

IsRunning checks if Traefik container is running

func (*Manager) RemoveContainer

func (m *Manager) RemoveContainer() error

RemoveContainer removes the Traefik container

func (*Manager) RestartContainer

func (m *Manager) RestartContainer() error

RestartContainer restarts the Traefik container

func (*Manager) RestoreConfig

func (m *Manager) RestoreConfig(backupPath string) error

RestoreConfig restores configuration from backup

func (*Manager) Setup

func (m *Manager) Setup() error

Setup sets up Traefik (configuration + container)

func (*Manager) StartContainer

func (m *Manager) StartContainer() error

StartContainer starts the Traefik container

func (*Manager) StopContainer

func (m *Manager) StopContainer() error

StopContainer stops the Traefik container

func (*Manager) UpdateConfig

func (m *Manager) UpdateConfig() error

UpdateConfig updates Traefik configuration and restarts the container

func (*Manager) ValidateConfig

func (m *Manager) ValidateConfig() error

ValidateConfig validates the Traefik configuration

Jump to

Keyboard shortcuts

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